Actually fix scheduled closing on MySQL/MariaDB

master
Dragory 2018-03-11 22:42:40 +02:00
parent 23a39dd335
commit 0b677d338e
1 changed files with 2 additions and 1 deletions

View File

@ -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.`,