mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 13:47:33 +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
@@ -634,7 +634,12 @@ schema.methods.sendChat = function sendChat (options = {}) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
sendPushNotification(member, { identifier: 'chatMention', title: `${user.profile.name} mentioned you in ${this.name}`, message });
|
||||
sendPushNotification(member, {
|
||||
identifier: 'chatMention',
|
||||
title: `${user.profile.name} mentioned you in ${this.name}`,
|
||||
message: newChatMessage.unformattedText,
|
||||
payload: { type: this.type },
|
||||
});
|
||||
});
|
||||
}
|
||||
return newChatMessage;
|
||||
|
||||
Reference in New Issue
Block a user