Never dismiss friend requests

pull/1/head
yflory 6 years ago
parent 06a07d069e
commit 19a91f11c6

@ -17,7 +17,6 @@ define([
common.addFriendRequest(data); common.addFriendRequest(data);
// Display the notification // Display the notification
$(el).find('.cp-notification-dismiss').attr('title', Messages.friendRequest_dismiss).css('display', 'flex');
$(el).find('.cp-notification-content').addClass("cp-clickable"); $(el).find('.cp-notification-content').addClass("cp-clickable");
$(el).find('.cp-notification-content p') $(el).find('.cp-notification-content p')
.html(Messages._getKey('friendRequest_notification', [msg.content.displayName]) .html(Messages._getKey('friendRequest_notification', [msg.content.displayName])

@ -960,7 +960,7 @@ define([
store.proxy.friends_pending = store.proxy.friends_pending || {}; store.proxy.friends_pending = store.proxy.friends_pending || {};
var twoDaysAgo = +new Date(); // (+new Date() - (2 * 24 * 3600 * 1000)); // XXX var twoDaysAgo = +new Date() - (2 * 24 * 3600 * 1000);
if (store.proxy.friends_pending[data.curvePublic] && if (store.proxy.friends_pending[data.curvePublic] &&
store.proxy.friends_pending[data.curvePublic] > twoDaysAgo) { store.proxy.friends_pending[data.curvePublic] > twoDaysAgo) {
return void cb({error: 'TIMEOUT'}); return void cb({error: 'TIMEOUT'});
@ -1511,7 +1511,7 @@ define([
var cleanFriendRequests = function () { var cleanFriendRequests = function () {
try { try {
if (!store.proxy.friends_pending) { return; } if (!store.proxy.friends_pending) { return; }
var twoDaysAgo = +new Date() - (2 * 24 * 3600 * 1000); // XXX var twoDaysAgo = +new Date() - (2 * 24 * 3600 * 1000);
Object.keys(store.proxy.friends_pending).forEach(function (curve) { Object.keys(store.proxy.friends_pending).forEach(function (curve) {
if (store.proxy.friends_pending[curve] < twoDaysAgo) { if (store.proxy.friends_pending[curve] < twoDaysAgo) {
delete store.proxy.friends_pending[curve]; delete store.proxy.friends_pending[curve];

@ -235,7 +235,6 @@ MessengerUI, Messages) {
var pendingFriends = Common.getPendingFriends(); // Friend requests sent var pendingFriends = Common.getPendingFriends(); // Friend requests sent
var friendRequests = Common.getFriendRequests(); // Friend requests received var friendRequests = Common.getFriendRequests(); // Friend requests received
var friendTo = +new Date() - (2 * 24 * 3600 * 1000); var friendTo = +new Date() - (2 * 24 * 3600 * 1000);
//friendTo = +new Date(); // XXX
editUsersNames.forEach(function (data) { editUsersNames.forEach(function (data) {
var name = data.name || Messages.anonymous; var name = data.name || Messages.anonymous;
var $span = $('<span>', {'class': 'cp-avatar'}); var $span = $('<span>', {'class': 'cp-avatar'});

Loading…
Cancel
Save