Remove the ACCEPT or DECLINE friend request messages instantly

This commit is contained in:
yflory
2019-05-27 11:18:53 +02:00
parent d514854724
commit 8dd557a0f6
3 changed files with 65 additions and 33 deletions

View File

@@ -25,19 +25,19 @@ define([
});
};
handlers['ACCEPT_FRIEND_REQUEST'] = function (common, data, el) {
handlers['FRIEND_REQUEST_ACCEPTED'] = function (common, data, el) {
var content = data.content;
var msg = content.msg;
$(el).find('.cp-notification-content p')
.html(Messages._getKey('friendRequest_accepted', [msg.content.displayName]));
.html(Messages._getKey('friendRequest_accepted', [msg.content.name]));
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};
handlers['DECLINE_FRIEND_REQUEST'] = function (common, data, el) {
handlers['FRIEND_REQUEST_DECLINED'] = function (common, data, el) {
var content = data.content;
var msg = content.msg;
$(el).find('.cp-notification-content p')
.html(Messages._getKey('friendRequest_declined', [msg.content.displayName]));
.html(Messages._getKey('friendRequest_declined', [msg.content.name]));
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};