diff --git a/packages/backend/src/remote/activitypub/renderer/announce.ts b/packages/backend/src/remote/activitypub/renderer/announce.ts index bb04a7f3d7..1fd1842acf 100644 --- a/packages/backend/src/remote/activitypub/renderer/announce.ts +++ b/packages/backend/src/remote/activitypub/renderer/announce.ts @@ -4,6 +4,10 @@ import type { Note } from "@/models/entities/note.js"; export default (object: any, note: Note) => { const attributedTo = `${config.url}/users/${note.userId}`; + const mentions = ( + JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers + ).map((x) => x.uri); + let to: string[] = []; let cc: string[] = []; @@ -13,9 +17,10 @@ export default (object: any, note: Note) => { } else if (note.visibility === "home") { to = [`${attributedTo}/followers`]; cc = ["https://www.w3.org/ns/activitystreams#Public"]; - } else if (note.visibility === 'followers') { + } else if (note.visibility === "followers") { to = [`${attributedTo}/followers`]; - cc = []; + } else if (note.visibility === "specified") { + to = mentions; } else { return null; }