fix (backend): make sure to use the exact same time for id and createdAt
This commit is contained in:
parent
def565af9b
commit
db4e0e931b
1 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
// 相手がこの通知をミュートしているようなら、既読を予めつけておく
|
||||
|
|
Loading…
Reference in a new issue