From 7e2a35d7a91e1946462618730382e1b159e0a460 Mon Sep 17 00:00:00 2001 From: SabreCat Date: Mon, 5 Jun 2023 16:36:00 -0500 Subject: [PATCH] WIP(sunset): fix private Guild and report form --- website/client/src/components/bugReportModal.vue | 2 +- website/common/locales/en/generic.json | 4 ++-- website/server/controllers/api-v3/chat.js | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/website/client/src/components/bugReportModal.vue b/website/client/src/components/bugReportModal.vue index a085d9be75..8cf60c768c 100644 --- a/website/client/src/components/bugReportModal.vue +++ b/website/client/src/components/bugReportModal.vue @@ -15,7 +15,7 @@ {{ question ? $t('askQuestionHeaderDescribe') : $t('reportBugHeaderDescribe') }}
diff --git a/website/common/locales/en/generic.json b/website/common/locales/en/generic.json index cef3781f5a..bb07735c43 100644 --- a/website/common/locales/en/generic.json +++ b/website/common/locales/en/generic.json @@ -101,8 +101,8 @@ "reportDescriptionText": "Include screenshots or Javascript console errors if helpful.", "reportDescriptionPlaceholder": "Describe the bug in detail here", "submitBugReport": "Submit Bug Report", - "reportSent": "Bug report sent!", - "reportSentDescription": "We’ll get back to you once our team has a chance to investigate. Thank you for reporting the issue.", + "reportSent": "Thank you for your submission!", + "reportSentDescription": "We’ll get back to you once our team has a chance to review.", "overview": "Overview for New Users", "dateFormat": "Date Format", "achievementStressbeast": "Savior of Stoïkalm", diff --git a/website/server/controllers/api-v3/chat.js b/website/server/controllers/api-v3/chat.js index d4793a8fb3..aeb5c71df9 100644 --- a/website/server/controllers/api-v3/chat.js +++ b/website/server/controllers/api-v3/chat.js @@ -129,8 +129,11 @@ api.postChat = { if (validationErrors) throw validationErrors; const group = await Group.getGroup({ user, groupId }); + const { purchased } = group; + const isUpgraded = purchased && purchased.plan && purchased.plan.customerId + && (!purchased.plan.dateTerminated || moment().isBefore(purchased.plan.dateTerminated)); - if (group.type !== 'party' && !(group.purchased && group.purchased.plan.customerId)) { + if (group.type !== 'party' && !isUpgraded) { throw new BadRequest(res.t('featureRetired')); }