Skip to content

Commit

Permalink
feat: Add support for new event "chat_join_request"
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Pérez Fernández committed Nov 7, 2021
1 parent 15c878e commit 6c0f2e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 6c0f2e7

Please sign in to comment.