Appena confermo la Registrazione, setto l'Amicizia in automatico.

This commit is contained in:
paoloar77
2022-02-25 19:54:20 +01:00
parent ec492b7322
commit 574d192661
2 changed files with 3 additions and 2 deletions

View File

@@ -1389,8 +1389,7 @@ UserSchema.statics.removeReqFriend = async function(
{$pull: {'profile.req_friends': {username: {$in: [usernameDest]}}}});
};
UserSchema.statics.setFriendsCmd = async function(
idapp, usernameOrig, usernameDest, cmd, value) {
UserSchema.statics.setFriendsCmd = async function(idapp, usernameOrig, usernameDest, cmd, value) {
let ris = null;
let update = {};

View File

@@ -3497,6 +3497,8 @@ if (true) {
await myclTelegram.setCmdToUsername(rec, data.username,
Cmd.VALIDATE_REGISTRATION, true);
await User.setFriendsCmd(user.idapp, data.username, userDest.username, shared_consts.FRIENDSCMD.SETFRIEND);
const msgOrig = printf(
getstr(userDest.lang, 'MSG_APORTADOR_DEST_CONFIRMED'),
`${userDest.username}`);