From 6c0f2e73c0c040d2116bb984eb68751f97de2e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=C3=A9rez=20Fern=C3=A1ndez?= Date: Sun, 7 Nov 2021 16:07:50 +0100 Subject: [PATCH] feat: Add support for new event "chat_join_request" --- src/telegram.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/telegram.js b/src/telegram.js index e4b7b2c..b204873 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -624,6 +624,7 @@ class TelegramBot extends EventEmitter { const pollAnswer = update.poll_answer; const chatMember = update.chat_member; const myChatMember = update.my_chat_member; + const chatJoinRequest = update.chat_join_request; if (message) { debug('Process Update message %j', message); @@ -713,6 +714,9 @@ class TelegramBot extends EventEmitter { } else if (myChatMember) { debug('Process Update my_chat_member %j', myChatMember); this.emit('my_chat_member', myChatMember); + } else if (chatJoinRequest) { + debug('Process Update my_chat_member %j', chatJoinRequest); + this.emit('chat_join_request', chatJoinRequest); } }