diff --git a/src/data/Thread.js b/src/data/Thread.js index 92ffc49..5df777e 100644 --- a/src/data/Thread.js +++ b/src/data/Thread.js @@ -143,7 +143,7 @@ class Thread { dm_message_id: msg.id }); - // The 1970 check is a knex bug, see https://github.com/tgriesser/knex/issues/1276 + // The string type check is due to a knex bug, see https://github.com/tgriesser/knex/issues/1276 if (this.scheduled_close_at && typeof this.scheduled_close_at === 'string') { await this.cancelScheduledClose(); await this.postSystemMessage({ diff --git a/src/main.js b/src/main.js index 0fbcc99..099e196 100644 --- a/src/main.js +++ b/src/main.js @@ -256,7 +256,8 @@ addInboxServerCommand('close', async (msg, args, thread) => { if (args.length) { if (args[0] === 'cancel') { // Cancel timed close - if (thread.scheduled_close_at) { + // The string type check is due to a knex bug, see https://github.com/tgriesser/knex/issues/1276 + if (thread.scheduled_close_at && typeof thread.scheduled_close_at === 'string') { await thread.cancelScheduledClose(); thread.postSystemMessage(`Cancelled scheduled closing`); }