fix(zulip): remove invalid kwargs from SendResult calls
SendResult only accepts: success, message_id, error, raw_response, retryable. The adapter was passing platform=, chat_id=, and metadata= which are not valid fields, causing TypeError on every send attempt. This was the error Tanko was showing in Zulip: 'SendResult.__init__() got an unexpected keyword argument "platform"'
This commit is contained in:
@@ -765,10 +765,7 @@ class ZulipAdapter(BasePlatformAdapter):
|
||||
self._health_stats["send_count"] += 1
|
||||
return SendResult(
|
||||
success=True,
|
||||
platform="zulip",
|
||||
chat_id=chat_id,
|
||||
message_id=msg_id,
|
||||
metadata={"placeholder": True},
|
||||
)
|
||||
|
||||
# Send actual content
|
||||
@@ -777,16 +774,12 @@ class ZulipAdapter(BasePlatformAdapter):
|
||||
self._health_stats["send_count"] += 1
|
||||
return SendResult(
|
||||
success=True,
|
||||
platform="zulip",
|
||||
chat_id=chat_id,
|
||||
message_id=str(result["id"]),
|
||||
)
|
||||
|
||||
self._health_stats["send_errors"] += 1
|
||||
return SendResult(
|
||||
success=False,
|
||||
platform="zulip",
|
||||
chat_id=chat_id,
|
||||
error="Failed to send message",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user