This commit is contained in:
2024-06-17 22:15:47 +02:00
parent b427531896
commit 882f2a7982
3 changed files with 18 additions and 16 deletions

View File

@@ -152,22 +152,22 @@ async def main():
# Login succeeded!
logger.info(f"Logged in as {config.user_id}")
#logger.info(f"Logged in as {config.user_id}")
await client.join("!aRFGSGKGeaBxiEfDMC:matrix.org")
print("joined room")
sleep(5)
await client.sync()
print(client.rooms)
#print("joined room")
#sleep(5)
#await client.sync()
#print(client.rooms)
#await client.room_send(
# # Watch out! If you join an old room you'll see lots of old messages
# room_id="!zKwFlsxXpmVhBMdOBa:matrix.org",
# message_type="m.room.message",
# content={"msgtype": "m.text", "body": "Hello world!"},
# )
#t = threading.Thread(target = foo, args =(client, ))
#t.start()
await foo(client)
##await client.room_send(
## # Watch out! If you join an old room you'll see lots of old messages
## room_id="!zKwFlsxXpmVhBMdOBa:matrix.org",
## message_type="m.room.message",
## content={"msgtype": "m.text", "body": "Hello world!"},
## )
##t = threading.Thread(target = foo, args =(client, ))
##t.start()
#await foo(client)
await client.sync_forever(timeout=30000, full_state=True)
except (ClientConnectionError, ServerDisconnectedError):