diff --git a/src/matrix_applicationbot/classes/bot.py b/src/matrix_applicationbot/classes/bot.py index 73fe693..0cbcc5c 100644 --- a/src/matrix_applicationbot/classes/bot.py +++ b/src/matrix_applicationbot/classes/bot.py @@ -485,7 +485,7 @@ class ApplicationBot: "m.room.message", { "msgtype": "m.text", - "body": f"Your application #{ticket_id} has been created. Please check your DMs.", + "body": f"{sender} Your application #{ticket_id} has been created. Please check your DMs.", }, ) @@ -626,9 +626,13 @@ class ApplicationBot: ) # Relay the entire event content to the target room - await self.client.room_send( - target_room_id, "m.room.message", event.source["content"] - ) + try: + await self.client.room_send( + target_room_id, "m.room.message", event.source["content"] + ) + except Exception as e: + logging.error(f"Failed to relay message: {e}") + logging.debug(f"Event source: {event.source}") async def help_command(self, room, sender): if await self.is_operator(sender):