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');
|
const giftBadge = this.get('giftBadge');
|
||||||
if (giftBadge) {
|
if (giftBadge) {
|
||||||
const emoji = '✨';
|
const emoji = '✨';
|
||||||
const fromContact = getContact(this.attributes);
|
|
||||||
|
|
||||||
if (isOutgoing(this.attributes)) {
|
if (isOutgoing(this.attributes)) {
|
||||||
|
const toContact = window.ConversationController.get(
|
||||||
|
this.attributes.conversationId
|
||||||
|
);
|
||||||
const recipient =
|
const recipient =
|
||||||
fromContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
toContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
||||||
return {
|
return {
|
||||||
emoji,
|
emoji,
|
||||||
text: window.i18n('icu:message--donation--preview--sent', {
|
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 =
|
const sender =
|
||||||
fromContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
fromContact?.getTitle() ?? window.i18n('icu:unknownContact');
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Reference in a new issue