Add push notification for party activity (#11319)

* Add push notification for party activity

* Improve inbox notifications

* move sendChatPushNotifications method

* Fix import

* Fix failing test

* Improve notification display on iOS

* correctly set push notification environment
This commit is contained in:
Phillip Thelen
2019-09-30 19:36:22 +02:00
committed by Matteo Pagliazzi
parent f3fb09f4f9
commit bbbe0cca09
6 changed files with 38 additions and 6 deletions

View File

@@ -11,8 +11,8 @@ import {
import { removeFromArray } from '../../libs/collectionManipulators';
import { getUserInfo, getGroupUrl, sendTxn } from '../../libs/email';
import slack from '../../libs/slack';
import { getAuthorEmailFromMessage } from '../../libs/chat';
import { chatReporterFactory } from '../../libs/chatReporting/chatReporterFactory';
import { getAuthorEmailFromMessage} from '../../libs/chat';
import nconf from 'nconf';
import bannedWords from '../../libs/bannedWords';
import guildsAllowingBannedWords from '../../libs/guildsAllowingBannedWords';
@@ -223,7 +223,7 @@ api.postChat = {
});
}
const newChatMessage = group.sendChat({message: req.body.message, user, flagCount, metaData: null, client});
const newChatMessage = group.sendChat({message: req.body.message, user, flagCount, metaData: null, client, translate: res.t});
let toSave = [newChatMessage.save()];
if (group.type === 'party') {