diff --git a/test/api/unit/libs/webhooks.test.js b/test/api/unit/libs/webhooks.test.js index 761eda713b..b3cf687c21 100644 --- a/test/api/unit/libs/webhooks.test.js +++ b/test/api/unit/libs/webhooks.test.js @@ -43,6 +43,7 @@ describe('webhooks', () => { options: { questStarted: true, questFinised: true, + questInvited: true, }, }, { id: 'userActivity', @@ -576,7 +577,7 @@ describe('webhooks', () => { }; }); - ['questStarted', 'questFinised'].forEach(type => { + ['questStarted', 'questFinised', 'questInvited'].forEach(type => { it(`sends ${type} webhooks`, () => { data.type = type; diff --git a/test/api/unit/models/webhook.test.js b/test/api/unit/models/webhook.test.js index 4a49b6213f..5527e686f0 100644 --- a/test/api/unit/models/webhook.test.js +++ b/test/api/unit/models/webhook.test.js @@ -183,6 +183,7 @@ describe('Webhook Model', () => { options: { questStarted: true, questFinished: true, + questInvited: true, }, }; }); @@ -197,6 +198,7 @@ describe('Webhook Model', () => { expect(wh.options).to.eql({ questStarted: false, questFinished: false, + questInvited: false, }); }); @@ -210,6 +212,7 @@ describe('Webhook Model', () => { expect(wh.options).to.eql({ questStarted: false, questFinished: true, + questInvited: true, }); }); @@ -224,6 +227,7 @@ describe('Webhook Model', () => { expect(wh.options).to.eql({ questStarted: true, questFinished: true, + questInvited: true, }); }); diff --git a/website/server/models/webhook.js b/website/server/models/webhook.js index aaa4560a56..21b79e6791 100644 --- a/website/server/models/webhook.js +++ b/website/server/models/webhook.js @@ -28,6 +28,7 @@ const USER_ACTIVITY_DEFAULT_OPTIONS = Object.freeze({ const QUEST_ACTIVITY_DEFAULT_OPTIONS = Object.freeze({ questStarted: false, questFinished: false, + questInvited: false, }); export const schema = new Schema({