Improvements and fixes for push notifications (#11507)

* Strip markdown from push notifications

* Revert "Strip markdown from push notifications"

This reverts commit 4741e584c6.

* correctly set type for mention push notifications

* Add unformattedText field to chat messages

* fiix lint errors

* Add check that markdown formatting is stripped from messages

* Add check for markdown formatting in messages.
This commit is contained in:
Phillip Thelen
2019-11-29 18:46:26 +01:00
committed by Matteo Pagliazzi
parent 3c394e7448
commit b108b047cd
8 changed files with 28 additions and 9 deletions

View File

@@ -1317,7 +1317,7 @@ describe('Group Model', () => {
it('formats message', () => {
const chatMessage = party.sendChat({
message: 'a new message',
message: 'a _new_ message with *markdown*',
user: {
_id: 'user-id',
profile: { name: 'user name' },
@@ -1336,7 +1336,8 @@ describe('Group Model', () => {
const chat = chatMessage;
expect(chat.text).to.eql('a new message');
expect(chat.text).to.eql('a _new_ message with *markdown*');
expect(chat.unformattedText).to.eql('a new message with markdown');
expect(validator.isUUID(chat.id)).to.eql(true);
expect(chat.timestamp).to.be.a('date');
expect(chat.likes).to.eql({});