mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
fix(telegram): set reply_to_message_id correctly (#1918)
This commit is contained in:
@@ -216,8 +216,6 @@ class TelegramAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter):
|
|||||||
components = await TelegramMessageConverter.yiri2target(message, self.bot)
|
components = await TelegramMessageConverter.yiri2target(message, self.bot)
|
||||||
args = {}
|
args = {}
|
||||||
message_id = message_source.source_platform_object.message.id
|
message_id = message_source.source_platform_object.message.id
|
||||||
if quote_origin:
|
|
||||||
args['reply_to_message_id'] = message_source.source_platform_object.message.id
|
|
||||||
|
|
||||||
component = components[0]
|
component = components[0]
|
||||||
if message_id not in self.msg_stream_id: # 当消息回复第一次时,发送新消息
|
if message_id not in self.msg_stream_id: # 当消息回复第一次时,发送新消息
|
||||||
@@ -233,6 +231,8 @@ class TelegramAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter):
|
|||||||
'chat_id': message_source.source_platform_object.effective_chat.id,
|
'chat_id': message_source.source_platform_object.effective_chat.id,
|
||||||
'text': content,
|
'text': content,
|
||||||
}
|
}
|
||||||
|
if quote_origin:
|
||||||
|
args['reply_to_message_id'] = message_source.source_platform_object.message.id
|
||||||
if self.config['markdown_card'] is True:
|
if self.config['markdown_card'] is True:
|
||||||
args['parse_mode'] = 'MarkdownV2'
|
args['parse_mode'] = 'MarkdownV2'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user