mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 15:09:32 +00:00
change error message for sending too many invitations to instruct them to email us
This commit is contained in:
parent
8a2e6a98c2
commit
fbda3a87ef
2 changed files with 5 additions and 3 deletions
|
|
@ -148,6 +148,7 @@
|
|||
"invitationsSent": "Invitations sent!",
|
||||
"invitationSent": "Invitation sent!",
|
||||
"inviteAlertInfo2": "Or share this link (copy/paste):",
|
||||
"inviteLimitReached": "You have already sent the maximum number of email invitations. We have a limit to prevent spamming, however if you would like more, please contact us at <%= techAssistanceEmail %> and we'll be happy to discuss it!",
|
||||
"sendGiftHeading": "Send Gift to <%= name %>",
|
||||
"sendGiftGemsBalance": "From <%= number %> Gems",
|
||||
"sendGiftCost": "Total: $<%= cost %> USD",
|
||||
|
|
@ -270,6 +271,5 @@
|
|||
"confirmCancelGroupPlan": "Are you sure you want to cancel the group plan and remove its benefits from all members, including their free subscriptions?",
|
||||
"canceledGroupPlan": "Canceled Group Plan",
|
||||
"groupPlanCanceled": "Group Plan will become inactive on",
|
||||
"purchasedGroupPlanPlanExtraMonths": "You have <%= months %> months of extra group plan credit.",
|
||||
"inviteLimitReached": "You have already sent the max number of email invites."
|
||||
"purchasedGroupPlanPlanExtraMonths": "You have <%= months %> months of extra group plan credit."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { authWithHeaders } from '../../middlewares/auth';
|
||||
import Bluebird from 'bluebird';
|
||||
import _ from 'lodash';
|
||||
import nconf from 'nconf';
|
||||
import {
|
||||
model as Group,
|
||||
basicFields as basicGroupFields,
|
||||
|
|
@ -28,6 +29,7 @@ import shared from '../../../common';
|
|||
import apiMessages from '../../libs/apiMessages';
|
||||
|
||||
const MAX_EMAIL_INVITES_BY_USER = 200;
|
||||
const TECH_ASSISTANCE_EMAIL = nconf.get('EMAILS:TECH_ASSISTANCE_EMAIL');
|
||||
|
||||
/**
|
||||
* @apiDefine GroupBodyInvalid
|
||||
|
|
@ -1058,7 +1060,7 @@ api.inviteToGroup = {
|
|||
|
||||
req.checkParams('groupId', res.t('groupIdRequired')).notEmpty();
|
||||
|
||||
if (user.invitesSent >= MAX_EMAIL_INVITES_BY_USER) throw new NotAuthorized(res.t('inviteLimitReached'));
|
||||
if (user.invitesSent >= MAX_EMAIL_INVITES_BY_USER) throw new NotAuthorized(res.t('inviteLimitReached', { techAssistanceEmail: TECH_ASSISTANCE_EMAIL }));
|
||||
|
||||
let validationErrors = req.validationErrors();
|
||||
if (validationErrors) throw validationErrors;
|
||||
|
|
|
|||
Loading…
Reference in a new issue