From 0b677d338ec515630bea20154fddd95862a787aa Mon Sep 17 00:00:00 2001 From: Dragory Date: Sun, 11 Mar 2018 22:42:40 +0200 Subject: [PATCH] Actually fix scheduled closing on MySQL/MariaDB --- src/data/Thread.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/Thread.js b/src/data/Thread.js index 0ba9c23..320eafe 100644 --- a/src/data/Thread.js +++ b/src/data/Thread.js @@ -143,7 +143,8 @@ class Thread { dm_message_id: msg.id }); - if (this.scheduled_close_at) { + // The 1970 check is a knex bug, see https://github.com/tgriesser/knex/issues/1276 + if (this.scheduled_close_at && this.scheduled_close_at !== '1970-01-01T00:00:00.000Z') { await this.cancelScheduledClose(); await this.postSystemMessage({ content: `<@!${this.scheduled_close_id}> Thread that was scheduled to be closed got a new reply. Cancelling.`,