share link
This commit is contained in:
Surya Paolo
2023-01-09 15:55:12 +01:00
parent dd51982795
commit e13fe84709

View File

@@ -2018,6 +2018,11 @@ UserSchema.statics.setFriendsCmd = async function (req, idapp, usernameOrig, use
// Invia una notifica alla persona
tools.sendNotificationByUsername(idapp, usernameDest, cmd, true, usernameOrig);
}
if (foundIfAlreadyAskFriend) {
ris = await User.getInfoFriendByUsername(idapp, usernameDest);
}
}
} else if (cmd === shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS) {
@@ -2039,6 +2044,8 @@ UserSchema.statics.setFriendsCmd = async function (req, idapp, usernameOrig, use
await SendNotif.createNewNotifToSingleUser(req, null, { usernameDest }, true, shared_consts.TypeNotifs.TYPEDIR_FRIENDS,
shared_consts.TypeNotifs.ID_FRIENDS_REFUSED);
ris = true;
} else if (cmd === shared_consts.FRIENDSCMD.BLOCK_USER) {
await this.removeReqFriend(idapp, usernameDest, usernameOrig); // Rimuovo la Richiesta di Amicizia da lui