fix(bot): react in operator room instead of user room

Updated the bot's reactions to be sent to the operator room rather than the user room to ensure that all reactions are correctly coordinated with operations. Removed redundant logging for cleaner output. This change is aimed at improving the message handling accuracy and operational efficiency.
This commit is contained in:
Kumi 2024-11-08 13:27:03 +01:00
parent 2632527f65
commit 8f5935e41d
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -109,9 +109,6 @@ class ApplicationBot:
message_body = event.body
sender = event.sender
logging.info(f"Processing reaction {reaction_key} from {sender} in {room.room_id}")
logging.info(f"Message: {message_body}")
if message_body.startswith("Application received from"):
# Extract user_id and ticket_id from the "apply" message
user_id, ticket_id = self.extract_info_from_application_message(
@ -225,7 +222,7 @@ class ApplicationBot:
logging.debug(f"Reacting to message {sent_message.event_id}")
await self.client.room_send(
room.room_id,
self.operator_room_id,
"m.reaction",
{
"m.relates_to": {
@ -236,7 +233,7 @@ class ApplicationBot:
},
)
await self.client.room_send(
room.room_id,
self.operator_room_id,
"m.reaction",
{
"m.relates_to": {
@ -247,7 +244,7 @@ class ApplicationBot:
},
)
await self.client.room_send(
room.room_id,
self.operator_room_id,
"m.reaction",
{
"m.relates_to": {