this prevents us spamming the server with sync requests
@ -118,7 +118,8 @@ async def main():
while True:
# do sync first to e.g. accept an admin room invite
sync = await matrix.sync(sync_filter=sync_filter)
sync = await matrix.sync(timeout=30000, sync_filter=sync_filter)
print('last sync: '+datetime.now())
for room_id in sync.rooms.invite:
print('joining '+room_id)
await matrix.join(room_id)