|
@@ -2359,13 +2359,14 @@ class ChattoAdapter(BasePlatformAdapter):
|
|
|
) -> SendResult:
|
|
) -> SendResult:
|
|
|
"""Send a local file as a native Chatto attachment.
|
|
"""Send a local file as a native Chatto attachment.
|
|
|
|
|
|
|
|
- ``file_name`` is the user-facing name the agent chose; Chatto takes the
|
|
|
|
|
- filename from the upload session, so it only matters for the failure
|
|
|
|
|
- notice.
|
|
|
|
|
|
|
+ ``file_name`` exists in the base-class signature and is accepted for
|
|
|
|
|
+ compatibility, but Chatto takes the recipient-visible filename from
|
|
|
|
|
+ the upload session (derived from the local path); failures are logged
|
|
|
|
|
+ and noticed by ``_send_local_attachment`` itself.
|
|
|
|
|
|
|
|
BasePlatformAdapter override
|
|
BasePlatformAdapter override
|
|
|
"""
|
|
"""
|
|
|
- result = await self._send_local_attachment(
|
|
|
|
|
|
|
+ return await self._send_local_attachment(
|
|
|
chat_id,
|
|
chat_id,
|
|
|
file_path,
|
|
file_path,
|
|
|
caption,
|
|
caption,
|
|
@@ -2373,9 +2374,6 @@ class ChattoAdapter(BasePlatformAdapter):
|
|
|
metadata,
|
|
metadata,
|
|
|
kind="file",
|
|
kind="file",
|
|
|
)
|
|
)
|
|
|
- if not result.success and file_name:
|
|
|
|
|
- logger.debug("Chatto: document delivery failed for %s", file_name)
|
|
|
|
|
- return result
|
|
|
|
|
|
|
|
|
|
async def send_video(
|
|
async def send_video(
|
|
|
self,
|
|
self,
|