Corretto le richieste di amicizie, aggiunto Accettazione sul BOT
This commit is contained in:
@@ -488,6 +488,7 @@ const txt = {
|
|||||||
MSG_ACCEPT_NEWENTRY_INGROUP: '❇️👥 🧍♂️ Accetta Ingresso nel GRUPPO %s:',
|
MSG_ACCEPT_NEWENTRY_INGROUP: '❇️👥 🧍♂️ Accetta Ingresso nel GRUPPO %s:',
|
||||||
MSG_FRIENDS_ACCEPTED: '✅ %s ha accettato la tua richiesta di Amicizia !',
|
MSG_FRIENDS_ACCEPTED: '✅ %s ha accettato la tua richiesta di Amicizia !',
|
||||||
MSG_FRIENDS_ACCEPTED_CONFIRMED: '✅ Hai accettato la richiesta di Amicizia di %s !',
|
MSG_FRIENDS_ACCEPTED_CONFIRMED: '✅ Hai accettato la richiesta di Amicizia di %s !',
|
||||||
|
MSG_FRIENDS_NOT_ACCEPTED_CONFIRMED: '🚫 Hai rifiutato la richiesta di Amicizia di %s !',
|
||||||
MSG_APORTADOR_CONFIRMED: '✅ %s è stato Abilitato correttamente (da %s)!',
|
MSG_APORTADOR_CONFIRMED: '✅ %s è stato Abilitato correttamente (da %s)!',
|
||||||
MSG_APORTADOR_DEST_CONFIRMED: '✅ Sei stato Abilitato correttamente da %s!\n' +
|
MSG_APORTADOR_DEST_CONFIRMED: '✅ Sei stato Abilitato correttamente da %s!\n' +
|
||||||
'Vai sulla App oppure clicca qui per entrare\n👉🏻 %s',
|
'Vai sulla App oppure clicca qui per entrare\n👉🏻 %s',
|
||||||
@@ -877,7 +878,7 @@ const MyTelegramBot = {
|
|||||||
|
|
||||||
if (myfunc === shared_consts.CallFunz.RICHIESTA_AMICIZIA) {
|
if (myfunc === shared_consts.CallFunz.RICHIESTA_AMICIZIA) {
|
||||||
|
|
||||||
domanda = printf(tools.gettranslate('RICHIESTA_AMICIZIA', langdest), userDest) + '<br>' + struserinfomsg;
|
domanda = printf(tools.gettranslate('RICHIESTA_AMICIZIA', langdest), myuser.username) + '<br>' + struserinfomsg;
|
||||||
|
|
||||||
keyb = cl.getInlineKeyboard(myuser.lang, [
|
keyb = cl.getInlineKeyboard(myuser.lang, [
|
||||||
{
|
{
|
||||||
@@ -3697,6 +3698,24 @@ if (true) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (data.action === InlineConferma.RISPOSTA_NO + shared_consts.CallFunz.RICHIESTA_AMICIZIA) {
|
||||||
|
|
||||||
|
if (userDest) {
|
||||||
|
cmd = shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS;
|
||||||
|
const foundIfAlreadyFriend = await User.isMyFriend(user.idapp, data.username, data.userDest);
|
||||||
|
|
||||||
|
if (foundIfAlreadyFriend) {
|
||||||
|
// Aggiungilo nelle Amicizie
|
||||||
|
const ris = await User.setFriendsCmd(user.idapp, data.username, data.userDest, cmd);
|
||||||
|
if (ris) {
|
||||||
|
const msgDest = printf(getstr(user.lang, 'MSG_FRIENDS_NOT_ACCEPTED_CONFIRMED'), data.username);
|
||||||
|
|
||||||
|
await local_sendMsgTelegram(user.idapp, data.userDest, msgDest);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user