diff --git a/.gitignore b/.gitignore index 12db6d0..1891dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,5 @@ dist/win-unpacked .DS_Store dist/squirrel-windows/com.joaomgcd.join-**full.nupkg dist/squirrel-windows/RELEASES -**.nupkg \ No newline at end of file +**.nupkg +*.bak \ No newline at end of file diff --git a/server/servernotification.js b/server/servernotification.js index 6460bac..b4c2eef 100644 --- a/server/servernotification.js +++ b/server/servernotification.js @@ -236,8 +236,11 @@ class WindowNotification{ const crypto = require("crypto"); this.options.id = crypto.randomBytes(16).toString("hex"); } - this.timeCreated = new Date().getTime(); - this.timeoutTime = this.timeCreated + this.options.timeout; + this.timeCreated = options.timeCreated || new Date().getTime(); + this.timeoutTime = options.timeoutTime || (this.timeCreated + this.options.timeout); + + this.options.timeCreated = this.timeCreated; + this.options.timeoutTime = this.timeoutTime; } set hidden(value){ this.options.hidden = value;