Browse Source

Accept pending invites on sync

Kumi 1 year ago
parent
commit
e369b63baf
2 changed files with 4 additions and 2 deletions
  1. 1 1
      callbacks/__init__.py
  2. 3 1
      callbacks/sync.py

+ 1 - 1
callbacks/__init__.py

@@ -7,7 +7,7 @@ from nio import (
     JoinResponse,
     InviteEvent,
     OlmEvent,
-    MegolmEvent
+    MegolmEvent,
 )
 
 from .test import test_callback

+ 3 - 1
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
+    bot.sync_token = SYNC_TOKEN
+
+    bot.accept_pending_invites()