Additional fix for scheduling in MySQL/MariaDB
parent
619c10fc08
commit
2251cabe86
|
@ -143,7 +143,7 @@ class Thread {
|
||||||
dm_message_id: msg.id
|
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') {
|
if (this.scheduled_close_at && typeof this.scheduled_close_at === 'string') {
|
||||||
await this.cancelScheduledClose();
|
await this.cancelScheduledClose();
|
||||||
await this.postSystemMessage({
|
await this.postSystemMessage({
|
||||||
|
|
|
@ -256,7 +256,8 @@ addInboxServerCommand('close', async (msg, args, thread) => {
|
||||||
if (args.length) {
|
if (args.length) {
|
||||||
if (args[0] === 'cancel') {
|
if (args[0] === 'cancel') {
|
||||||
// Cancel timed close
|
// 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();
|
await thread.cancelScheduledClose();
|
||||||
thread.postSystemMessage(`Cancelled scheduled closing`);
|
thread.postSystemMessage(`Cancelled scheduled closing`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue