Skip to content

Add support for Message.quote in tgtypes#23

Merged
Al-Muhandis merged 2 commits intomainfrom
codex/add-quote-field-to-message-object
Mar 16, 2026
Merged

Add support for Message.quote in tgtypes#23
Al-Muhandis merged 2 commits intomainfrom
codex/add-quote-field-to-message-object

Conversation

@Al-Muhandis
Copy link
Copy Markdown
Owner

@Al-Muhandis Al-Muhandis commented Mar 15, 2026

Motivation

  • Support Telegram Bot API message.quote (TextQuote) in the library so message objects expose the new quote payload.

Description

  • Added a new TTelegramTextQuote type with fields Position, Text, Entities and IsManual and implemented parsing and cleanup in its constructor/destructor.
  • Extended TTelegramMessageObj with an FQuote field and Quote property, added parsing of message.quote in the constructor, and freed FQuote in the destructor.
  • Added a unit test TTestMessageQuote.ParseMessageQuote which verifies parsing of quote including entity parsing and is_manual flag, and registered the test in the test suite.
  • Modified files: tgtypes.pas and test/testtelegram.pas to implement the feature and tests.

@Al-Muhandis Al-Muhandis marked this pull request as ready for review March 16, 2026 02:05
@Al-Muhandis Al-Muhandis merged commit 607f64c into main Mar 16, 2026
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