add expiry date to mailbox
This commit is contained in:
@@ -8,8 +8,15 @@ export interface Subscriber {
|
|||||||
export class Mailbox implements Subscriber {
|
export class Mailbox implements Subscriber {
|
||||||
// basic
|
// basic
|
||||||
id = Crypto.randomUUID();
|
id = Crypto.randomUUID();
|
||||||
|
dateLastChecked = new Date();
|
||||||
messages = new Set<string>();
|
messages = new Set<string>();
|
||||||
|
|
||||||
|
get expiryDate() {
|
||||||
|
const expiryDate = new Date(this.dateLastChecked);
|
||||||
|
expiryDate.setDate(expiryDate.getDate() + 7);
|
||||||
|
return expiryDate;
|
||||||
|
}
|
||||||
|
|
||||||
// websocket
|
// websocket
|
||||||
_ws: WS | undefined;
|
_ws: WS | undefined;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user