diff --git a/packages/backend/src/services/add-note-to-antenna.ts b/packages/backend/src/services/add-note-to-antenna.ts index b5bcd2304..d502be254 100644 --- a/packages/backend/src/services/add-note-to-antenna.ts +++ b/packages/backend/src/services/add-note-to-antenna.ts @@ -7,7 +7,7 @@ import { publishAntennaStream, publishMainStream } from '@/services/stream.js'; import { User } from '@/models/entities/user.js'; export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: { id: User['id']; }): Promise { - // 通知しない設定になっているか、自分自身の投稿なら既読にする + // If it's set to not notify the user, or if it's the user's own post, read it. const read = !antenna.notify || (antenna.userId === noteUser.id); AntennaNotes.insert({ @@ -43,7 +43,7 @@ export async function addNoteToAntenna(antenna: Antenna, note: Note, noteUser: { return; } - // 2秒経っても既読にならなかったら通知 + // Notify if not read after 2 seconds setTimeout(async () => { const unread = await AntennaNotes.findOneBy({ antennaId: antenna.id, read: false }); if (unread) { diff --git a/packages/backend/src/services/create-notification.ts b/packages/backend/src/services/create-notification.ts index ab4fbfa10..bbb4ab356 100644 --- a/packages/backend/src/services/create-notification.ts +++ b/packages/backend/src/services/create-notification.ts @@ -24,7 +24,7 @@ export async function createNotification( createdAt: new Date(), notifieeId, type, - // 相手がこの通知をミュートしているようなら、既読を予めつけておく + // If the other party seems to have muted this notification, pre-read it. isRead: isMuted, ...data, } as Partial) @@ -35,13 +35,13 @@ export async function createNotification( // Publish notification event publishMainStream(notifieeId, 'notification', packed); - // 2秒経っても(今回作成した)通知が既読にならなかったら「未読の通知がありますよ」イベントを発行する + // If the notification (created this time) has not been read after 2 seconds, issue a "You have unread notifications" event. setTimeout(async () => { const fresh = await Notifications.findOneBy({ id: notification.id }); - if (fresh == null) return; // 既に削除されているかもしれない + if (fresh == null) return; // It may have already been deleted. if (fresh.isRead) return; - //#region ただしミュートしているユーザーからの通知なら無視 + //#region However, if the notification comes from a muted user, ignore it. const mutings = await Mutings.findBy({ muterId: notifieeId, }); diff --git a/packages/backend/src/services/delete-account.ts b/packages/backend/src/services/delete-account.ts index c1ab9e2be..ed3e381c4 100644 --- a/packages/backend/src/services/delete-account.ts +++ b/packages/backend/src/services/delete-account.ts @@ -7,7 +7,7 @@ export async function deleteAccount(user: { id: string; host: string | null; }): Promise { - // 物理削除する前にDelete activityを送信する + // Send Delete activity before physical deletion await doPostSuspend(user).catch(() => {}); createDeleteAccountJob(user, {