From 9fb2a73ec54c730dfeb9b1330630f8df07b21ffb Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 21 Dec 2019 21:02:41 +0200 Subject: [PATCH] Update mautrix-python to handle invites separately from leaves. Fixes #402 --- mautrix_telegram/matrix.py | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mautrix_telegram/matrix.py b/mautrix_telegram/matrix.py index 5f521ddb..27d6f164 100644 --- a/mautrix_telegram/matrix.py +++ b/mautrix_telegram/matrix.py @@ -215,6 +215,11 @@ class MatrixHandler(BaseMatrixHandler): event_id: EventID) -> None: await self.handle_kick_ban(False, room_id, user_id, kicked_by, reason, event_id) + async def handle_unban(self, room_id: RoomID, user_id: UserID, unbanned_by: UserID, + reason: str, event_id: EventID) -> None: + # TODO handle unbans properly instead of handling it as a kick + await self.handle_kick_ban(False, room_id, user_id, unbanned_by, reason, event_id) + async def handle_ban(self, room_id: RoomID, user_id: UserID, banned_by: UserID, reason: str, event_id: EventID) -> None: await self.handle_kick_ban(True, room_id, user_id, banned_by, reason, event_id) diff --git a/setup.py b/setup.py index 99a93c8a..09c0212b 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ setuptools.setup( install_requires=[ "aiohttp>=3.0.1,<4", - "mautrix>=0.4.0rc4,<0.5", + "mautrix>=0.4.0rc5,<0.5", "SQLAlchemy>=1.2.3,<2", "alembic>=1.0.0,<2", "commonmark>=0.8.1,<0.10",