diff --git a/packages/backend/src/server/activitypub/outbox.ts b/packages/backend/src/server/activitypub/outbox.ts index e0a380ffb..adc06798a 100644 --- a/packages/backend/src/server/activitypub/outbox.ts +++ b/packages/backend/src/server/activitypub/outbox.ts @@ -133,12 +133,13 @@ export async function packActivity(note: Note): Promise { if ( note.renoteId && note.text == null && + note.cw == null && !note.hasPoll && (note.fileIds == null || note.fileIds.length === 0) ) { const renote = await Notes.findOneByOrFail({ id: note.renoteId }); return renderAnnounce( - renote.uri ? renote.uri : `${config.url}/notes/${renote.id}`, + renote.uri ?? `${config.url}/notes/${renote.id}`, note, ); } diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index 095c75f42..7c255f423 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -596,7 +596,11 @@ export default async ( }); //#region AP deliver - if (Users.isLocalUser(user) && !dontFederateInitially) { + if ( + Users.isLocalUser(user) && + !data.localOnly && + !dontFederateInitially + ) { (async () => { const noteActivity = await renderNoteOrRenoteActivity(data, note); const dm = new DeliverManager(user, noteActivity); @@ -661,12 +665,11 @@ async function renderNoteOrRenoteActivity(data: Option, note: Note) { const content = data.renote && data.text == null && + data.cw == null && data.poll == null && (data.files == null || data.files.length === 0) ? renderAnnounce( - data.renote.uri - ? data.renote.uri - : `${config.url}/notes/${data.renote.id}`, + data.renote.uri ?? `${config.url}/notes/${data.renote.id}`, note, ) : renderCreate(await renderNote(note, false), note); diff --git a/packages/backend/src/services/note/delete.ts b/packages/backend/src/services/note/delete.ts index 90175ccdc..a53905479 100644 --- a/packages/backend/src/services/note/delete.ts +++ b/packages/backend/src/services/note/delete.ts @@ -61,6 +61,7 @@ export default async function ( if ( note.renoteId && note.text == null && + note.cw == null && !note.hasPoll && (note.fileIds == null || note.fileIds.length === 0) ) { diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index ab9801a22..25c0ee228 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -328,6 +328,7 @@ if (noteViewInterruptors.length > 0) { const isRenote = note.renote != null && note.text == null && + note.cw == null && note.fileIds.length === 0 && note.poll == null; diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index f8d7eec27..3c05bc619 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -21,6 +21,7 @@ export function getNoteMenu(props: { const isRenote = props.note.renote != null && props.note.text == null && + props.note.cw == null && props.note.fileIds.length === 0 && props.note.poll == null;