fix(weixin): correct send_image_file parameter name to match base class

The send_image_file method in WeixinAdapter used 'path' as parameter
name, but BasePlatformAdapter and gateway callers use 'image_path'.
This mismatch caused image sending to fail when called through the
gateway's extract_media path.

Changed parameter name from 'path' to 'image_path' to match the
interface defined in base.py and the calls in gateway/run.py.
This commit is contained in:
赵晨飞 2026-04-17 02:36:03 +08:00 committed by Teknium
parent 5d929caa59
commit 902d6b97d6

View file

@ -1542,12 +1542,12 @@ class WeixinAdapter(BasePlatformAdapter):
async def send_image_file(
self,
chat_id: str,
path: str,
image_path: str,
caption: str = "",
reply_to: Optional[str] = None,
metadata: Optional[Dict[str, Any]] = None,
) -> SendResult:
return await self.send_document(chat_id, file_path=path, caption=caption, metadata=metadata)
return await self.send_document(chat_id, file_path=image_path, caption=caption, metadata=metadata)
async def send_document(
self,