diff --git a/packages/backend/src/services/create-notification.ts b/packages/backend/src/services/create-notification.ts index fa86d2dec6..7e338eb614 100644 --- a/packages/backend/src/services/create-notification.ts +++ b/packages/backend/src/services/create-notification.ts @@ -8,7 +8,7 @@ import { Followings, } from "@/models/index.js"; import { - genId, + genIdAt, isSilencedServer, sendPushNotification, PushNotificationKind, @@ -63,9 +63,10 @@ export async function createNotification( } // Create notification + const createdAt = new Date(); const notification = await Notifications.insert({ - id: genId(), - createdAt: new Date(), + id: genIdAt(createdAt), + createdAt, notifieeId: notifieeId, type: type, // 相手がこの通知をミュートしているようなら、既読を予めつけておく