fix(weixin): harden protocol delivery, streaming, and login (#5263)

This commit is contained in:
chengyongru
2026-08-07 16:53:31 +08:00
committed by GitHub
parent edb3b7e446
commit 332c159b93
23 changed files with 2858 additions and 238 deletions
+17
View File
@@ -101,6 +101,23 @@ class BaseChannel(ABC):
"""
pass
def should_retry_send_error(self, error: Exception) -> bool:
"""Return whether the channel manager may retry a failed delivery.
Channels with protocol-level business errors can override this hook to
prevent retries that cannot succeed until external state changes.
Transport and unexpected errors remain retryable by default.
"""
return True
def start_error_message(self, error: Exception) -> str | None:
"""Return an actionable public message for a channel startup failure.
Channel-specific exception handling stays in the owning channel. Returning
``None`` keeps the manager's generic fallback.
"""
return None
async def send_delta(
self,
chat_id: str,