Fix notification text for gifted badges
This commit is contained in:
parent
3c84acc758
commit
9a9c1c5879
1 changed files with 5 additions and 2 deletions
|
@ -768,11 +768,13 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
const giftBadge = this.get('giftBadge');
|
||||
if (giftBadge) {
|
||||
const emoji = '✨';
|
||||
const fromContact = getContact(this.attributes);
|
||||
|
||||
if (isOutgoing(this.attributes)) {
|
||||
const toContact = window.ConversationController.get(
|
||||
this.attributes.conversationId
|
||||
);
|
||||
const recipient =
|
||||
fromContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
||||
toContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
||||
return {
|
||||
emoji,
|
||||
text: window.i18n('icu:message--donation--preview--sent', {
|
||||
|
@ -781,6 +783,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
};
|
||||
}
|
||||
|
||||
const fromContact = getContact(this.attributes);
|
||||
const sender =
|
||||
fromContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue