Realtime update of the friendship status in the profile

This commit is contained in:
yflory
2019-05-27 17:51:55 +02:00
parent 6370c0eeae
commit c3e9b51f76
5 changed files with 41 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ define([
// Display the notification
$(el).find('.cp-notification-content').addClass("cp-clickable");
$(el).find('.cp-notification-content p')
.html(Messages._getKey('friendRequest_notification', [msg.content.displayName]))
.html(Messages._getKey('friendRequest_notification', [msg.content.displayName || Messages.anonymous]))
.click(function () {
UIElements.displayFriendRequestModal(common, data);
});
@@ -29,7 +29,7 @@ define([
var content = data.content;
var msg = content.msg;
$(el).find('.cp-notification-content p')
.html(Messages._getKey('friendRequest_accepted', [msg.content.name]));
.html(Messages._getKey('friendRequest_accepted', [msg.content.name || Messages.anonymous]));
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};
@@ -37,7 +37,7 @@ define([
var content = data.content;
var msg = content.msg;
$(el).find('.cp-notification-content p')
.html(Messages._getKey('friendRequest_declined', [msg.content.name]));
.html(Messages._getKey('friendRequest_declined', [msg.content.name || Messages.anonymous]));
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};