Skip to content

feat(router): handle 9 new Telegram update types#94

Merged
wrxck merged 2 commits intodevelopfrom
feat/router-expansion
Feb 13, 2026
Merged

feat(router): handle 9 new Telegram update types#94
wrxck merged 2 commits intodevelopfrom
feat/router-expansion

Conversation

@wrxck
Copy link
Owner

@wrxck wrxck commented Feb 13, 2026

Summary

  • Add handler functions and api.run() wiring for: chat_join_request, chat_member, my_chat_member, message_reaction, poll, poll_answer, chat_boost, removed_chat_boost, message_reaction_count
  • Each handler uses a lightweight context builder (no full middleware pipeline) and dispatches to plugin hooks following existing patterns
  • Fix callback_query handler to create valid chat context for inline buttons (was creating empty {} chat object)
  • Update allowed_updates list with all new types

Test plan

  • Join a group that has the bot — verify on_chat_join_request fires
  • React to messages — verify on_message_reaction fires
  • Create a poll — verify on_poll and on_poll_answer fire
  • Boost a chat — verify on_chat_boost fires
  • Verify existing message/callback/inline handling still works

🤖 Generated with Claude Code

Add handler functions and api.run() wiring for:
- chat_join_request: approve/decline join requests via plugins
- chat_member: member status changes (promoted, left, etc.)
- my_chat_member: bot's own status changes (added/removed/promoted)
- message_reaction: emoji reaction changes on messages
- poll: poll state changes (closed, etc.)
- poll_answer: individual user votes on polls
- chat_boost / removed_chat_boost: boost/unboost events
- message_reaction_count: anonymous reaction counts

Each handler uses a lightweight context builder (no full middleware
pipeline) and dispatches to plugin hooks following the same pcall +
error logging pattern as existing handlers.

Also fixes callback_query handler to create valid chat context for
inline button callbacks (was creating empty chat object).
# Conflicts:
#	src/core/router.lua
@wrxck wrxck merged commit 5269eac into develop Feb 13, 2026
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.

1 participant