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