WIP(chat): first pass deprecation

This commit is contained in:
SabreCat
2023-05-17 16:33:44 -05:00
parent d176c31382
commit 8d9602fb16
11 changed files with 13 additions and 189 deletions

View File

@@ -130,6 +130,10 @@ api.postChat = {
const group = await Group.getGroup({ user, groupId });
if (group.type !== 'party' && !(group.purchased && group.purchased.plan.customerId)) {
throw new BadRequest(res.t('featureRetired'));
}
// Check message for banned slurs
if (group && group.privacy !== 'private' && textContainsBannedSlur(req.body.message)) {
const { message } = req.body;