From 9d3a4b16bd3dc4fab4f9d0b0add1b73a5cf59d7e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 23 Aug 2020 14:25:29 +0300 Subject: [PATCH] Update mautrix-python to fix bugs --- maubot/client.py | 2 +- maubot/handlers/event.py | 5 +++++ requirements.txt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/maubot/client.py b/maubot/client.py index 73da264..98d6c65 100644 --- a/maubot/client.py +++ b/maubot/client.py @@ -304,7 +304,7 @@ class Client: mxid = await new_client.whoami() if mxid != self.id: raise ValueError(f"MXID mismatch: {mxid}") - new_client.sync_store = self.db_instance + new_client.sync_store = SyncStoreProxy(self.db_instance) self.stop_sync() self.client = new_client self.db_instance.homeserver = homeserver diff --git a/maubot/handlers/event.py b/maubot/handlers/event.py index f02cc86..be02706 100644 --- a/maubot/handlers/event.py +++ b/maubot/handlers/event.py @@ -33,3 +33,8 @@ def on(var: Union[EventType, InternalEventType, EventHandler] return func return decorator if isinstance(var, (EventType, InternalEventType)) else decorator(var) + + +def off(func: EventHandler) -> EventHandler: + func.__mb_event_handler__ = False + return func diff --git a/requirements.txt b/requirements.txt index e42e0dc..900aad5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -mautrix==0.6.0rc4 +mautrix==0.7.0rc3 aiohttp>=3,<4 SQLAlchemy>=1,<2 alembic>=1,<2