feat(db): track last push time by device id with numeric timestamps
Assign stable ids to stored tokens, migrate legacy ISO lastNotifiedAt to epoch ms, replace setLastNotifiedAt with db.update, and persist lastNotifiedAt only after a successful FCM send. Extend Device with optional lastNotifiedAt (ms).
This commit is contained in:
@@ -4,4 +4,6 @@ export interface Device {
|
||||
platform: "ios" | "android" | "web";
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
/** Epoch ms; set only after a successful push send. */
|
||||
lastNotifiedAt?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user