diff --git a/js/conversation_controller.js b/js/conversation_controller.js index 816c3c4f4..37c1eb6a6 100644 --- a/js/conversation_controller.js +++ b/js/conversation_controller.js @@ -82,7 +82,7 @@ initialize() { this.on('change:timestamp change:name change:number change:profileName', this.sort); - this.listenTo(conversations, 'add change:active_at', this.addActive); + this.listenTo(conversations, 'add change:active_at change:friendRequestStatus', this.addActive); this.listenTo(conversations, 'reset', () => this.reset([])); this.collator = new Intl.Collator(); diff --git a/js/models/conversations.js b/js/models/conversations.js index 7a6963abb..af8ce2409 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -2166,6 +2166,7 @@ messageSentAt: Date.now(), title: i18n(title), isFriendRequest: true, + friendRequestType: type, }); }, diff --git a/js/notifications.js b/js/notifications.js index 4a3d0bb59..5295b2a96 100644 --- a/js/notifications.js +++ b/js/notifications.js @@ -100,8 +100,15 @@ const last = this.last().toJSON(); switch (userSetting) { case SettingNames.COUNT: - title = 'Signal'; - message = newMessageCountLabel; + title = 'Loki Messenger'; + + if (last.isFriendRequest) { + message = `Friend request ${last.friendRequestType}`; + } else if (messagesNotificationCount > 0) { + message = newMessageCountLabel; + } else { + return; + } break; case SettingNames.NAME: { const lastMessageTitle = last.title;