소스 검색

Accept pending invites on sync

Kumi 1 년 전
부모
커밋
e369b63baf
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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()