Additional fix for scheduling in MySQL/MariaDB

master
Dragory 2018-03-11 23:19:45 +02:00
parent 619c10fc08
commit 2251cabe86
2 changed files with 3 additions and 2 deletions

View File

@ -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({

View File

@ -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`);
}