Skip to content

Add support for message reactions and reaction count updates#21

Merged
Al-Muhandis merged 4 commits intomainfrom
codex/add-reaction-handling-to-fp-telegram-library
Mar 11, 2026
Merged

Add support for message reactions and reaction count updates#21
Al-Muhandis merged 4 commits intomainfrom
codex/add-reaction-handling-to-fp-telegram-library

Conversation

@Al-Muhandis
Copy link
Copy Markdown
Owner

@Al-Muhandis Al-Muhandis commented Feb 9, 2026

Motivation

  • Add first-class support for Telegram message reactions so the library can receive and expose reaction-related updates.
  • Surface reaction events to consumers so apps can react to individual reaction changes and aggregated reaction counts.

Description

  • Added new data models TTelegramReactionType, TTelegramReactionCount, TTelegramMessageReactionUpdated and TTelegramMessageReactionCountUpdated and corresponding lists in tgtypes.pas to represent reaction payloads and counts.
  • Extended TUpdateType with utMessageReaction and utMessageReactionCount, updated UpdateTypeAliases and UpdateTypeClasses, and added MessageReaction / MessageReactionCount properties and getters on TTelegramUpdateObj in tgtypes.pas.
  • Implemented JSON parsing constructors/destructors for the new types to build reaction objects from incoming update JSON in tgtypes.pas.
  • Exposed new events TMessageReactionEvent and TMessageReactionCountEvent, added fields/properties OnReceiveMessageReaction and OnReceiveMessageReactionCount, implemented DoReceiveMessageReaction and DoReceiveMessageReactionCount handlers, and wired dispatch for the new update kinds in tgsendertypes.pas.

@Al-Muhandis Al-Muhandis marked this pull request as ready for review March 11, 2026 10:13
@Al-Muhandis Al-Muhandis merged commit 0e34872 into main Mar 11, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant