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