修复Action没有reply_to_message的问题

This commit is contained in:
SengokuCola
2025-08-11 14:55:23 +08:00
parent 709e00a404
commit 6f49b3d99d
4 changed files with 39 additions and 11 deletions

View File

@@ -228,6 +228,7 @@ class BaseAction(ABC):
stream_id=self.chat_id,
reply_to=reply_to,
typing=typing,
reply_to_message=self.action_message,
)
async def send_emoji(self, emoji_base64: str) -> bool:
@@ -243,7 +244,7 @@ class BaseAction(ABC):
logger.error(f"{self.log_prefix} 缺少聊天ID")
return False
return await send_api.emoji_to_stream(emoji_base64, self.chat_id)
return await send_api.emoji_to_stream(emoji_base64, self.chat_id,reply_to_message=self.action_message)
async def send_image(self, image_base64: str) -> bool:
"""发送图片
@@ -258,7 +259,7 @@ class BaseAction(ABC):
logger.error(f"{self.log_prefix} 缺少聊天ID")
return False
return await send_api.image_to_stream(image_base64, self.chat_id)
return await send_api.image_to_stream(image_base64, self.chat_id,reply_to_message=self.action_message)
async def send_custom(self, message_type: str, content: str, typing: bool = False, reply_to: str = "") -> bool:
"""发送自定义类型消息
@@ -282,6 +283,7 @@ class BaseAction(ABC):
stream_id=self.chat_id,
typing=typing,
reply_to=reply_to,
reply_to_message=self.action_message,
)
async def store_action_info(
@@ -336,6 +338,7 @@ class BaseAction(ABC):
stream_id=self.chat_id,
storage_message=storage_message,
display_message=display_message,
reply_to_message=self.action_message,
)
if success:

View File

@@ -100,7 +100,7 @@ class BaseCommand(ABC):
logger.error(f"{self.log_prefix} 缺少聊天流或stream_id")
return False
return await send_api.text_to_stream(text=content, stream_id=chat_stream.stream_id, reply_to=reply_to)
return await send_api.text_to_stream(text=content, stream_id=chat_stream.stream_id, reply_to=reply_to,reply_to_message=self.message)
async def send_type(
self, message_type: str, content: str, display_message: str = "", typing: bool = False, reply_to: str = ""
@@ -130,6 +130,7 @@ class BaseCommand(ABC):
display_message=display_message,
typing=typing,
reply_to=reply_to,
reply_to_message=self.message,
)
async def send_command(
@@ -161,6 +162,7 @@ class BaseCommand(ABC):
stream_id=chat_stream.stream_id,
storage_message=storage_message,
display_message=display_message,
reply_to_message=self.message,
)
if success:
@@ -188,7 +190,7 @@ class BaseCommand(ABC):
logger.error(f"{self.log_prefix} 缺少聊天流或stream_id")
return False
return await send_api.emoji_to_stream(emoji_base64, chat_stream.stream_id)
return await send_api.emoji_to_stream(emoji_base64, chat_stream.stream_id,reply_to_message=self.message)
async def send_image(self, image_base64: str) -> bool:
"""发送图片
@@ -204,7 +206,7 @@ class BaseCommand(ABC):
logger.error(f"{self.log_prefix} 缺少聊天流或stream_id")
return False
return await send_api.image_to_stream(image_base64, chat_stream.stream_id)
return await send_api.image_to_stream(image_base64, chat_stream.stream_id,reply_to_message=self.message)
@classmethod
def get_command_info(cls) -> "CommandInfo":