fix(gateway): Matrix and Mattermost never report as connected
Neither adapter called _mark_connected() after successful connect(), so _running stayed False, runtime status never showed 'connected', and /status reported them as offline even while actively processing messages. Add _mark_connected() calls matching the pattern used by Telegram and DingTalk adapters.
This commit is contained in:
parent
b16186a32a
commit
b111f2a779
2 changed files with 2 additions and 0 deletions
|
|
@ -220,6 +220,7 @@ class MatrixAdapter(BasePlatformAdapter):
|
||||||
|
|
||||||
# Start the sync loop.
|
# Start the sync loop.
|
||||||
self._sync_task = asyncio.create_task(self._sync_loop())
|
self._sync_task = asyncio.create_task(self._sync_loop())
|
||||||
|
self._mark_connected()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
async def disconnect(self) -> None:
|
async def disconnect(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,7 @@ class MattermostAdapter(BasePlatformAdapter):
|
||||||
|
|
||||||
# Start WebSocket in background.
|
# Start WebSocket in background.
|
||||||
self._ws_task = asyncio.create_task(self._ws_loop())
|
self._ws_task = asyncio.create_task(self._ws_loop())
|
||||||
|
self._mark_connected()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
async def disconnect(self) -> None:
|
async def disconnect(self) -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue