diff --git a/locales/en-US.yml b/locales/en-US.yml index c4753f2c2b..0cf65916eb 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -3177,3 +3177,6 @@ _searchSite: otherDescription: "Use other search engine" query: "Query" queryDescription: "Input query scheme for search engine. For example, if https://www.google.com/search?q=test, input 'q'." +_yodangang: + anonymousChannel: "Anonymous channel" + anonymousUsername: "Anonymous" diff --git a/locales/ko-KR.yml b/locales/ko-KR.yml index 0530aaf5e3..5e766803b4 100644 --- a/locales/ko-KR.yml +++ b/locales/ko-KR.yml @@ -3192,3 +3192,6 @@ _searchSite: otherDescription: "검색 엔진을 직접 지정할 수 있어요." query: "검색 쿼리" queryDescription: "검색 엔진이 사용할 쿼리를 입력해 주세요. (예: https://www.google.com/search?q=test 의 경우 q를 입력)" +_yodangang: + anonymousChannel: "익명 채널" + anonymousUsername: "익명의 유령" diff --git a/packages/backend/src/anonymize.ts b/packages/backend/src/anonymize.ts index 8024740930..4736966b60 100644 --- a/packages/backend/src/anonymize.ts +++ b/packages/backend/src/anonymize.ts @@ -17,7 +17,7 @@ export function anonymizeNote(note: MiNote | any, meId: string | null = '') { note.replyUserId = note.replyUserId ? 'anonymous' : null; note.renoteUserId = note.replyUserId ? 'anonymous' : null; - + if (meId == null) { note.cw = null; note.fileIds = []; diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index f7d6a77b54..3ab549b03c 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -854,6 +854,12 @@ function emitUpdReaction(emoji: string, delta: number) { emit('reaction', emoji); } } + +if (note.value.channel?.anonymous && $i.id !== note.value.userId) { + note.value.userId = ''; + note.value.user.id = ''; + note.value.user.username = i18n.ts._yodangang.anonymousUsername; +}