fix(bot): correct message type for emoji reaction

Changed the message type check from `RoomMessageText` to `RoomSendResponse` for accurate handling of sent message responses regarding emoji reactions. This ensures appropriate logging and message processing in compliance with expected response types.
This commit is contained in:
Kumi 2024-11-08 13:20:48 +01:00
parent 84de0f7eb5
commit 2632527f65
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -13,6 +13,7 @@ from nio import (
RoomKickResponse,
RoomInviteResponse,
ReactionEvent,
RoomSendResponse,
)
import logging
@ -220,7 +221,7 @@ class ApplicationBot:
)
# React to the message with approve, reject, and invite emojis
if isinstance(sent_message, RoomMessageText):
if isinstance(sent_message, RoomSendResponse):
logging.debug(f"Reacting to message {sent_message.event_id}")
await self.client.room_send(