Update reaction last message notification text
This commit is contained in:
parent
db557104a6
commit
13785a0936
2 changed files with 36 additions and 0 deletions
|
@ -5943,6 +5943,18 @@
|
||||||
"message": "Reacted to a story",
|
"message": "Reacted to a story",
|
||||||
"description": "Used whenever we can't find a user's first name"
|
"description": "Used whenever we can't find a user's first name"
|
||||||
},
|
},
|
||||||
|
"Quote__story-reaction-notification--incoming": {
|
||||||
|
"message": "Reacted $emoji$ to your story",
|
||||||
|
"description": "Notification test for incoming story reactions"
|
||||||
|
},
|
||||||
|
"Quote__story-reaction-notification--outgoing": {
|
||||||
|
"message": "You reacted $emoji$ to a story from $name$",
|
||||||
|
"description": "Notification test for outgoing story reactions"
|
||||||
|
},
|
||||||
|
"Quote__story-reaction-notification--outgoing--nameless": {
|
||||||
|
"message": "You reacted $emoji$ to a story",
|
||||||
|
"description": "Notification test for outgoing story reactions but no name"
|
||||||
|
},
|
||||||
"Quote__story-unavailable": {
|
"Quote__story-unavailable": {
|
||||||
"message": "No longer available",
|
"message": "No longer available",
|
||||||
"description": "Label for when a story is not found"
|
"description": "Label for when a story is not found"
|
||||||
|
|
|
@ -956,6 +956,30 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
const { attributes } = this;
|
const { attributes } = this;
|
||||||
|
|
||||||
if (attributes.storyReactionEmoji) {
|
if (attributes.storyReactionEmoji) {
|
||||||
|
if (attributes.type === 'outgoing') {
|
||||||
|
const name = this.getConversation()?.get('profileName');
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
return window.i18n(
|
||||||
|
'Quote__story-reaction-notification--outgoing--nameless',
|
||||||
|
{
|
||||||
|
emoji: attributes.storyReactionEmoji,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return window.i18n('Quote__story-reaction-notification--outgoing', {
|
||||||
|
emoji: attributes.storyReactionEmoji,
|
||||||
|
name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attributes.type === 'incoming') {
|
||||||
|
return window.i18n('Quote__story-reaction-notification--incoming', {
|
||||||
|
emoji: attributes.storyReactionEmoji,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!window.Signal.OS.isLinux()) {
|
if (!window.Signal.OS.isLinux()) {
|
||||||
return attributes.storyReactionEmoji;
|
return attributes.storyReactionEmoji;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue