Skip to content

Commit

Permalink
fixed entered and left chat event (#27)
Browse files Browse the repository at this point in the history
* fixed entered and left chat event

---------

Co-authored-by: Denis Utkin <denis_utkin@epam.com>
  • Loading branch information
ZEREX222 and Denis Utkin authored Dec 22, 2024
1 parent bd03504 commit df3b833
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ protected AbstractUpdateRequest(Update update) {
this.text = null;
this.chat = null;
this.requestType = RequestType.PAID_MEDIA_PURCHASED;
} else if(update.getMyChatMember() != null) {
this.user = update.getMyChatMember().getFrom();
this.text = null;
this.chat = update.getMyChatMember().getChat();
this.requestType = RequestType.MY_CHAT_MEMBER_UPDATED;
}
// this condition is unreachable
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,9 @@ public enum RequestType {
*
* @see Update#getPaidMediaPurchased()
*/
PAID_MEDIA_PURCHASED
PAID_MEDIA_PURCHASED,
/**
* Represents me a chat member updated update
*/
MY_CHAT_MEMBER_UPDATED
}

0 comments on commit df3b833

Please sign in to comment.