ver: 0.5.55

Strette di Mano OK
This commit is contained in:
Surya Paolo
2023-01-09 02:37:35 +01:00
parent 331c2e6780
commit a4b42a1fc3
9 changed files with 33 additions and 256 deletions

View File

@@ -125,7 +125,7 @@ const textlang = {
'MSG_SEND_FROM': 'Msg Inviato da',
'ZOOM_CONFERMATO': 'Sei stato confermato ad aver visto la Video Conferenza di Benvenuto!',
'RICHIESTA_AMICIZIA': '🌈 Richiesta d\'Amicizia da parte di %s',
'RICHIESTA_HANDSHAKE': '🌈 Confermi che hai conosciuto personalmente e dai la tua fiducia a %s ?',
'RICHIESTA_HANDSHAKE': '🌈 %s ha comunicato che ti conosce personalmente e ha fiducia in te.',
'ACCETTATO_SUL_GRUPPO': '✅ Sei stato accettato da %s a far parte del Gruppo %s',
'CREATO_NUOVO_GRUPPO': '✅ Hai appena creato un nuovo Gruppo chiamato %s',
'ACCETTATO_NOTIFICA_ADMINS': '✅ l\'utente %s è stato accettato a far parte del Gruppo %s (da parte di %s)',
@@ -913,17 +913,21 @@ module.exports = {
telegrambot.askConfirmationUserFriend(idapp, shared_consts.CallFunz.RICHIESTA_AMICIZIA, userrecDest, username, usernameOrig);
}
} else if (cmd === shared_consts.FRIENDSCMD.REQHANDSHAKE) {
} else if (cmd === shared_consts.FRIENDSCMD.SETHANDSHAKE) {
descr = printf(this.get__('RICHIESTA_HANDSHAKE', lang), usernameOrig);
openUrl = '/my/' + usernameOrig;
tag = 'reqfriends';
tag = 'reqhandshake';
const userrecDest = await User.getUserShortDataByUsername(idapp, usernameOrig);
const foundIfAlreadyHandShake = await User.isMyHandShake(idapp, username, usernameOrig);
if (userrecDest) {
sendmynotif = false; // non lo rimandare 2 volte !
// SEND TELEGRAM NOTIFICATION
telegrambot.askConfirmationUserFriend(idapp, shared_consts.CallFunz.RICHIESTA_HANDSHAKE, userrecDest, username, usernameOrig);
if (!foundIfAlreadyHandShake) {
// SEND TELEGRAM NOTIFICATION
telegrambot.askConfirmationUserFriend(idapp, shared_consts.CallFunz.RICHIESTA_HANDSHAKE, userrecDest, username, usernameOrig);
}
}
}

View File

@@ -500,13 +500,6 @@ module.exports = {
});
console.log('handshake.username result = ', ris);
ris = await User.updateMany({ idapp, 'profile.req_handshake.username': search_username },
{
$set:
{ 'profile.req_handshake.$.username': replace_username }
});
console.log('req_handshake.username result = ', ris);
ris = await Circuit.updateMany({ idapp, 'admins.username': search_username },
{ $set: { 'admins.$.username': replace_username } });
console.log('Circuit.admins.username result = ', ris);

View File

@@ -45,15 +45,12 @@ module.exports = {
FRIENDSCMD: {
SETTRUST: 121,
REQFRIEND: 125,
REQHANDSHAKE: 128,
SETFRIEND: 132,
SETHANDSHAKE: 133,
REMOVE_FROM_MYFRIENDS: 144,
REFUSE_REQ_FRIEND: 145,
CANCEL_REQ_FRIEND: 146,
REMOVE_FROM_MYHANDSHAKE: 147,
REFUSE_REQ_HANDSHAKE: 148,
CANCEL_REQ_HANDSHAKE: 149,
BLOCK_USER: 155,
UNBLOCK_USER: 156,
REPORT_USER: 158,
@@ -426,10 +423,7 @@ module.exports = {
ID_MSGS_NEW_REC: 1,
TYPEDIR_HANDSHAKE: 10,
ID_HANDSHAKE_NEW_REC: 1,
ID_HANDSHAKE_ACCEPTED: 2,
ID_HANDSHAKE_REFUSED: 4,
ID_HANDSHAKE_ACCEPTED_MY_REQUEST: 8,
TYPEDIR_TEST: 444,
ID_TEST_NEW_REC: 1,