diff --git a/src/matrix_applicationbot/classes/bot.py b/src/matrix_applicationbot/classes/bot.py index 4d45a3e..b3d4de6 100644 --- a/src/matrix_applicationbot/classes/bot.py +++ b/src/matrix_applicationbot/classes/bot.py @@ -203,8 +203,11 @@ class ApplicationBot: return await self.remove_monitored_room(command.split()[2]) elif command.startswith("!supportbot monitored"): return await self.list_monitored_rooms(room) - elif command.startswith("!supportbot protect"): - return await self.add_protected_room(command.split()[2]) + elif command.startswith("!supportbot protect "): + try: + return await self.add_protected_room(command.split()[2]) + except IndexError: + logging.error(f"No room ID specified for protect command: {command}") elif command.startswith("!supportbot unprotect"): return await self.remove_protected_room(command.split()[2]) elif command.startswith("!supportbot protected"): @@ -498,7 +501,7 @@ class ApplicationBot: async def open_ticket(self, room, sender): ticket_id = self.generate_ticket_id() - customer_room_alias = f"Ticket-{ticket_id}" + customer_room_alias = f"Application-{ticket_id}" operator_room_alias = f"Operator-Ticket-{ticket_id}" # Create customer-facing room