Skip to content

Commit

Permalink
fix: 消息链无元素时仍然插入了@和回复
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulter committed Jan 18, 2025
1 parent b3fd32a commit 7764626
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions astrbot/core/pipeline/result_decorate/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ async def process(self, event: AstrMessageEvent) -> Union[None, AsyncGenerator[N
logger.warning("文本转图片耗时超过了 3 秒,如果觉得很慢可以使用 /t2i 关闭文本转图片模式。")
if url:
result.chain = [Image.fromURL(url)]

if self.reply_with_mention and event.get_message_type() != MessageType.FRIEND_MESSAGE:
result.chain.insert(0, At(qq=event.get_sender_id()))

if self.reply_with_quote:
result.chain.insert(0, Reply(id=event.message_obj.message_id))
if self.reply_with_mention and event.get_message_type() != MessageType.FRIEND_MESSAGE:
result.chain.insert(0, At(qq=event.get_sender_id()))
if self.reply_with_quote:
result.chain.insert(0, Reply(id=event.message_obj.message_id))

0 comments on commit 7764626

Please sign in to comment.