Skip to content

feat(update): add UpdateType enum for unified update type resolution#1577

Open
makariyp wants to merge 4 commits intorubenlagus:devfrom
makariyp:feature/updateType
Open

feat(update): add UpdateType enum for unified update type resolution#1577
makariyp wants to merge 4 commits intorubenlagus:devfrom
makariyp:feature/updateType

Conversation

@makariyp
Copy link

Add UpdateType enum to provide a standardized way to determine the type
of an incoming Telegram update without writing boilerplate if-else chains
in application code.

Each enum constant holds a reference to the corresponding getter of the
Update object, allowing type detection via UpdateType.from(update).
This makes it easy to identify which handler should process a given update
and enables clean switch-based dispatch logic on the caller side.

rubenlagus and others added 4 commits February 9, 2026 23:18
# Conflicts:
#	pom.xml
#	telegrambots-abilities/pom.xml
#	telegrambots-client-jetty-adapter/pom.xml
#	telegrambots-client/pom.xml
#	telegrambots-extensions/README.md
#	telegrambots-extensions/pom.xml
#	telegrambots-longpolling/pom.xml
#	telegrambots-meta/pom.xml
#	telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/SetMyProfilePhoto.java
#	telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/message/Message.java
#	telegrambots-springboot-longpolling-starter/pom.xml
#	telegrambots-springboot-webhook-starter/pom.xml
#	telegrambots-test-reports/pom.xml
#	telegrambots-webhook/pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants