Mute friends: dismiss notifications and fix UI issues

This commit is contained in:
yflory
2019-12-10 13:07:57 +01:00
parent bbf2e3a9ae
commit 11ddb96422
7 changed files with 150 additions and 48 deletions

View File

@@ -1253,6 +1253,10 @@ define([
if (friend) { return void cb({error: 'ALREADY_FRIEND'}); }
if (!data.notifications || !data.curvePublic) { return void cb({error: 'INVALID_USER'}); }
// Unmute this user when we send them a friend request
var muted = store.proxy.mutedUsers || {};
delete muted[data.curvePublic];
store.proxy.friends_pending = store.proxy.friends_pending || {};
var twoDaysAgo = +new Date() - (2 * 24 * 3600 * 1000);