diff --git a/packages/backend/src/remote/activitypub/renderer/note.ts b/packages/backend/src/remote/activitypub/renderer/note.ts index 2ad2fec9fb..5fe59b3ab7 100644 --- a/packages/backend/src/remote/activitypub/renderer/note.ts +++ b/packages/backend/src/remote/activitypub/renderer/note.ts @@ -16,6 +16,7 @@ export default async function renderNote( dive = true, isTalk = false, ): Promise> { + note.visibility = note.visibility === "hidden" ? "home" : note.visibility; const getPromisedFiles = async (ids: string[]) => { if (!ids || ids.length === 0) return []; const items = await DriveFiles.findBy({ id: In(ids) }); diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index f2ccdca226..2a7b00b0fb 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -606,7 +606,8 @@ export default async ( }); async function renderNoteOrRenoteActivity(data: Option, note: Note) { - if (data.localOnly) return null; + if (data.localOnly || + note.visibility !== "hidden") return null; const content = data.renote && diff --git a/packages/backend/src/services/note/reaction/create.ts b/packages/backend/src/services/note/reaction/create.ts index 4cf1fd0941..9f4ed1375b 100644 --- a/packages/backend/src/services/note/reaction/create.ts +++ b/packages/backend/src/services/note/reaction/create.ts @@ -146,8 +146,7 @@ export default async ( //#region deliver if ( Users.isLocalUser(user) && - !note.localOnly && - note.visibility !== "hidden" + !note.localOnly ) { const content = renderActivity(await renderLike(record, note)); const dm = new DeliverManager(user, content); diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index 0903210030..ea01fcdc0a 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -35,7 +35,7 @@ const buttonRef = ref(); const canRenote = computed( () => - ["public", "home"].includes(props.note.visibility) || + ["public", "home","hidden"].includes(props.note.visibility) || props.note.userId === $i.id ); @@ -75,7 +75,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { let buttonActions = []; - if (props.note.visibility === "public") { + if (props.note.visibility === "public" || props.note.visibility === "hidden") { buttonActions.push({ text: i18n.ts.renote, textStyle: "font-weight: bold", @@ -102,7 +102,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { }); } - if (["public", "home"].includes(props.note.visibility)) { + if (["public", "home","hidden"].includes(props.note.visibility)) { buttonActions.push({ text: `${i18n.ts.renote} (${i18n.ts._visibility.home})`, icon: "ph-house ph-bold ph-lg",