mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 13:47:33 +01:00
Always send push notifications in recipients language (#11307)
* Load data needed for members when inviting to quest * Always send push notifications in recipients language. Fixes #8718 * Remove console.log
This commit is contained in:
committed by
Sabe Jones
parent
14106ec5bf
commit
04420aa60e
@@ -79,7 +79,7 @@ api.inviteToQuest = {
|
||||
'party._id': group._id,
|
||||
_id: {$ne: user._id},
|
||||
})
|
||||
.select('auth.facebook auth.google auth.local preferences.emailNotifications profile.name pushDevices')
|
||||
.select('auth.facebook auth.google auth.local preferences.emailNotifications preferences.pushNotifications preferences.language profile.name pushDevices')
|
||||
.exec();
|
||||
|
||||
group.markModified('quest');
|
||||
@@ -124,12 +124,11 @@ api.inviteToQuest = {
|
||||
sendPushNotification(
|
||||
member,
|
||||
{
|
||||
title: res.t('questInvitationTitle'),
|
||||
message: res.t('questInvitationInfo', {quest: quest.text(req.language)}),
|
||||
title: res.t('questInvitationTitle', member.preferences.language),
|
||||
message: res.t('questInvitationInfo', {quest: quest.text(member.preferences.language)}, member.preferences.language),
|
||||
identifier: 'questInvitation',
|
||||
category: 'questInvitation',
|
||||
}
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user