Repository navigation
fix: 转发时保留 Telegram 部分引用摘录 - #88
Merged
Merged
Conversation
Manual partial quotes now forward via ReplyParameters so the cited text is shown instead of a full-message reply. Ordinary swipe-replies keep the existing mapped reply_to_message_id behavior. Co-authored-by: pplulee <hi@pplulee.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Telegram 手动「引用」消息中的某一段时,Bot API 会同时提供
reply_to_message和Message.quote(TextQuote)。此前转发只映射了整条回复的reply_to_message_id,所以部分引用会被当成对来源整条消息的回复。本次改动:
Message.quote且is_manual不为False)与普通整条回复ReplyParameters.quote/quote_position/quote_entities保留被选中的摘录reply_to_message_id映射QUOTE_TEXT_INVALID)时,把摘录嵌入 HTML<blockquote>,避免引用内容丢失Fixes #84