From e369b63bafbc7957812b54d3c692ce849a39d495 Mon Sep 17 00:00:00 2001 From: Kumi Date: Mon, 1 May 2023 15:04:01 +0000 Subject: [PATCH] Accept pending invites on sync --- callbacks/__init__.py | 2 +- callbacks/sync.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/callbacks/__init__.py b/callbacks/__init__.py index e2693bb..4d9c22f 100644 --- a/callbacks/__init__.py +++ b/callbacks/__init__.py @@ -7,7 +7,7 @@ from nio import ( JoinResponse, InviteEvent, OlmEvent, - MegolmEvent + MegolmEvent, ) from .test import test_callback diff --git a/callbacks/sync.py b/callbacks/sync.py index fc4a9e7..b8cdb06 100644 --- a/callbacks/sync.py +++ b/callbacks/sync.py @@ -3,4 +3,6 @@ async def sync_callback(response, bot): f"Sync response received (next batch: {response.next_batch})", "debug") SYNC_TOKEN = response.next_batch - bot.sync_token = SYNC_TOKEN \ No newline at end of file + bot.sync_token = SYNC_TOKEN + + bot.accept_pending_invites() \ No newline at end of file