From 28416317860853122a9668697ed4d358668f3317 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 9 Jan 2021 03:05:38 +0200 Subject: [PATCH 1/3] Add *.config.ini to .gitignore for multi-config environments --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6757ecf..621624d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ /.vscode /.idea /node_modules -/config.* -!/config.example.ini /welcome.png /update.sh + +# Config files +/config.* +*.config.ini +!/config.example.ini From d24e4b046a2a49ff52a9d0f5b7c10aba37b6981b Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 20 Jan 2021 23:47:57 +0200 Subject: [PATCH 2/3] Fix global moderator role overrides --- ...or_role_overrides_thread_id_nullability.js | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/data/migrations/20210120231512_fix_moderator_role_overrides_thread_id_nullability.js diff --git a/src/data/migrations/20210120231512_fix_moderator_role_overrides_thread_id_nullability.js b/src/data/migrations/20210120231512_fix_moderator_role_overrides_thread_id_nullability.js new file mode 100644 index 0000000..cbad0ba --- /dev/null +++ b/src/data/migrations/20210120231512_fix_moderator_role_overrides_thread_id_nullability.js @@ -0,0 +1,41 @@ +exports.up = async function(knex) { + await knex.schema.renameTable("moderator_role_overrides", "old_moderator_role_overrides"); + + await knex.schema.createTable("moderator_role_overrides", table => { + table.increments("id"); + table.string("moderator_id", 20).notNullable(); + table.string("thread_id", 36).nullable().defaultTo(null); + table.string("role_id", 20).notNullable(); + + table.unique(["moderator_id", "thread_id"]); + }); + + const rows = await knex.table("old_moderator_role_overrides") + .select(); + + await knex.table("moderator_role_overrides").insert(rows); + + await knex.schema.dropTable("old_moderator_role_overrides"); +}; + +exports.down = async function(knex) { + await knex.schema.renameTable("moderator_role_overrides", "new_moderator_role_overrides"); + + await knex.schema.createTable("moderator_role_overrides", table => { + table.string("moderator_id", 20); + table.string("thread_id", 36).nullable().defaultTo(null); + table.string("role_id", 20); + + table.primary(["moderator_id", "thread_id"]); + }); + + const rows = await knex.table("new_moderator_role_overrides") + .select(); + + await knex.table("moderator_role_overrides").insert(rows.map(r => { + delete r.id; + return r; + })); + + await knex.schema.dropTable("new_moderator_role_overrides"); +}; From 3105bbebfed596c5255e1cfb32bc8e37d3294fb2 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:29:55 +0300 Subject: [PATCH 3/3] Fix crash from stage channels --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2983b70..675d59a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1396,10 +1396,10 @@ "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" }, "eris": { - "version": "https://github.com/Dragory/eris/archive/stickers-0.14.0.tar.gz", - "integrity": "sha512-4L04+OUPdKaADpFyatM0FYpNRYRCJSdYEIFRpVbPGjQUeHO4XkbqNZ4knL5yedMJqzzib3u2qFIJUkHu9HgAbw==", + "version": "https://github.com/Dragory/eris/archive/0.14.0-stage-hotfix.tar.gz", + "integrity": "sha512-zKnRLTkzi2d8Twrf1I8fNAePVeN3pCGgtXvZ+66eVlFsS6CIkppm0IzHG+tn9pMGf1PpFwzgxMdV1hiPUVyGSQ==", "requires": { - "opusscript": "^0.0.7", + "opusscript": "^0.0.8", "tweetnacl": "^1.0.1", "ws": "^7.2.1" } @@ -3896,9 +3896,9 @@ } }, "opusscript": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/opusscript/-/opusscript-0.0.7.tgz", - "integrity": "sha512-DcBadTdYTUuH9zQtepsLjQn4Ll6rs3dmeFvN+SD0ThPnxRBRm/WC1zXWPg+wgAJimB784gdZvUMA57gDP7FdVg==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/opusscript/-/opusscript-0.0.8.tgz", + "integrity": "sha512-VSTi1aWFuCkRCVq+tx/BQ5q9fMnQ9pVZ3JU4UHKqTkf0ED3fKEPdr+gKAAl3IA2hj9rrP6iyq3hlcJq3HELtNQ==", "optional": true }, "os-homedir": { @@ -5580,9 +5580,9 @@ } }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", + "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==" }, "xmlcreate": { "version": "2.0.3", diff --git a/package.json b/package.json index 40a74ca..40619be 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "ajv": "^6.12.4", - "eris": "https://github.com/Dragory/eris/archive/stickers-0.14.0.tar.gz", + "eris": "https://github.com/Dragory/eris/archive/0.14.0-stage-hotfix.tar.gz", "express": "^4.17.1", "helmet": "^4.1.1", "humanize-duration": "^3.23.1",