commit 88532ef2bb1ec0a78b2813d908a8045d205497a7
parent b53a7c88f6636aa00f71627122d46851c916a2bd
Author: MTRNord <mtrnord1@gmail.com>
Date: Wed, 1 Feb 2023 10:35:44 +0100
Ensure that we only write a message on join when the room was joined
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/matrix_call_multitrack_recorder/bot.py b/matrix_call_multitrack_recorder/bot.py
@@ -203,6 +203,10 @@ class RecordingBot:
response = f"Hello, I am a bot that records calls. Use !help to see available commands. I was invited by {sender_display_name.displayname}"
else:
response = f"Hello, I am a bot that records calls. Use !help to see available commands. I was invited by {event.sender}"
+ # FIXME: We should also check if the join worked or not.
+ while room.room_id not in self.client.rooms:
+ logger.debug("Waiting for room to be joined")
+ await asyncio.sleep(0.2)
await self.client.room_send(
room.room_id,
"m.room.message",