diff --git a/src/server/telegram/telegrambot.js b/src/server/telegram/telegrambot.js
index 1f91609..a4cb8c5 100755
--- a/src/server/telegram/telegrambot.js
+++ b/src/server/telegram/telegrambot.js
@@ -488,6 +488,7 @@ const txt = {
MSG_ACCEPT_NEWENTRY_INGROUP: 'โ๏ธ๐ฅ ๐งโโ๏ธ Accetta Ingresso nel GRUPPO %s:',
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_NOT_ACCEPTED_CONFIRMED: '๐ซ Hai rifiutato la richiesta di Amicizia di %s !',
MSG_APORTADOR_CONFIRMED: 'โ
%s รจ stato Abilitato correttamente (da %s)!',
MSG_APORTADOR_DEST_CONFIRMED: 'โ
Sei stato Abilitato correttamente da %s!\n' +
'Vai sulla App oppure clicca qui per entrare\n๐๐ป %s',
@@ -877,7 +878,7 @@ const MyTelegramBot = {
if (myfunc === shared_consts.CallFunz.RICHIESTA_AMICIZIA) {
- domanda = printf(tools.gettranslate('RICHIESTA_AMICIZIA', langdest), userDest) + '
' + struserinfomsg;
+ domanda = printf(tools.gettranslate('RICHIESTA_AMICIZIA', langdest), myuser.username) + '
' + struserinfomsg;
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);
+ }
+
+ }
+
}
}
}