mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
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:
committed by
Matteo Pagliazzi
parent
3c394e7448
commit
b108b047cd
@@ -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({});
|
||||
|
||||
Reference in New Issue
Block a user