fix(bot): correct event content access in reactions
Changed the `reaction_callback` method to access reaction event contents through `event.source["content"]` instead of `event.content`. This update addresses issues with data access during reaction handling, preventing potential errors. Added debug logging for improved tracing of reaction events.
This commit is contained in:
parent
105e5c7abe
commit
7df144e107
1 changed files with 3 additions and 1 deletions
|
@ -90,7 +90,9 @@ class ApplicationBot:
|
|||
await self.open_ticket(room, event.state_key)
|
||||
|
||||
async def reaction_callback(self, room: MatrixRoom, event):
|
||||
relation = event.content.get("m.relates_to", {})
|
||||
logging.debug(f"Received reaction event: {event}")
|
||||
|
||||
relation = event.source["content"].get("m.relates_to", {})
|
||||
message_id = relation.get("event_id")
|
||||
key = relation.get("key")
|
||||
|
||||
|
|
Loading…
Reference in a new issue