diff --git a/packages/backend/src/remote/activitypub/renderer/note.ts b/packages/backend/src/remote/activitypub/renderer/note.ts index 280205eaf..2ad2fec9f 100644 --- a/packages/backend/src/remote/activitypub/renderer/note.ts +++ b/packages/backend/src/remote/activitypub/renderer/note.ts @@ -16,7 +16,6 @@ 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 721147dd6..f2ccdca22 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -606,7 +606,7 @@ export default async ( }); async function renderNoteOrRenoteActivity(data: Option, note: Note) { - if (data.localOnly || note.visibility !== "hidden") return null; + if (data.localOnly) 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 277393eb4..4cf1fd094 100644 --- a/packages/backend/src/services/note/reaction/create.ts +++ b/packages/backend/src/services/note/reaction/create.ts @@ -144,7 +144,11 @@ export default async ( }); //#region deliver - if (Users.isLocalUser(user) && !note.localOnly) { + if ( + Users.isLocalUser(user) && + !note.localOnly && + note.visibility !== "hidden" + ) { const content = renderActivity(await renderLike(record, note)); const dm = new DeliverManager(user, content); if (note.userHost !== null) { diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index b70edda7d..05f43a5df 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", "hidden"].includes(props.note.visibility) || + ["public", "home"].includes(props.note.visibility) || props.note.userId === $i.id ); @@ -75,10 +75,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { let buttonActions = []; - if ( - props.note.visibility === "public" || - props.note.visibility === "hidden" - ) { + if (props.note.visibility === "public") { buttonActions.push({ text: i18n.ts.renote, textStyle: "font-weight: bold", @@ -105,11 +102,8 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { }); } - if (["public", "home", "hidden"].includes(props.note.visibility)) { - buttonActions.push({ - text: `${i18n.ts.renote} (${i18n.ts._visibility.home})`, + if (["public", "home"].includes(props.note.visibility)) { icon: "ph-house ph-bold ph-lg", - danger: false, action: () => { os.api("notes/create", { renoteId: props.note.id,