|
@@ -359,7 +359,7 @@ class ChattoAdapter(BasePlatformAdapter):
|
|
|
logger.error("Chatto: failed to create client: %s", e)
|
|
logger.error("Chatto: failed to create client: %s", e)
|
|
|
return None
|
|
return None
|
|
|
|
|
|
|
|
- async def _require_client(self) -> ChattoClient:
|
|
|
|
|
|
|
+ async def _require_chatto_client(self) -> ChattoClient:
|
|
|
"""Return a ChattoClient or raise RuntimeError if unavailable.
|
|
"""Return a ChattoClient or raise RuntimeError if unavailable.
|
|
|
|
|
|
|
|
The exception-flavoured variant of :meth:`_get_chatto_client`, for
|
|
The exception-flavoured variant of :meth:`_get_chatto_client`, for
|
|
@@ -928,7 +928,7 @@ class ChattoAdapter(BasePlatformAdapter):
|
|
|
|
|
|
|
|
async def _dispatch_message_posted(self, payload: MessagePostedPayload) -> None:
|
|
async def _dispatch_message_posted(self, payload: MessagePostedPayload) -> None:
|
|
|
# Respond-room gate first: read-only memberships must not cost a
|
|
# Respond-room gate first: read-only memberships must not cost a
|
|
|
- # single API call, so this runs before fetch_message and _require_client.
|
|
|
|
|
|
|
+ # single API call, so this runs before fetch_message and _get_chatto_client.
|
|
|
if not self._is_respond_room(payload.room_id):
|
|
if not self._is_respond_room(payload.room_id):
|
|
|
logger.debug(
|
|
logger.debug(
|
|
|
"Chatto: message from read-only room %s ignored", payload.room_id
|
|
"Chatto: message from read-only room %s ignored", payload.room_id
|
|
@@ -1385,7 +1385,7 @@ class ChattoAdapter(BasePlatformAdapter):
|
|
|
delay = ChattoConstants.WS_RECONNECT_INITIAL_BACKOFF
|
|
delay = ChattoConstants.WS_RECONNECT_INITIAL_BACKOFF
|
|
|
while not self._closing:
|
|
while not self._closing:
|
|
|
try:
|
|
try:
|
|
|
- client = await self._require_client()
|
|
|
|
|
|
|
+ client = await self._require_chatto_client()
|
|
|
|
|
|
|
|
await self._refresh_rooms()
|
|
await self._refresh_rooms()
|
|
|
logger.info(
|
|
logger.info(
|