fix(bot): correct ticket ID parsing logic
Adjusted ticket ID extraction to handle commands with three parts instead of two, ensuring proper ticket closure functionality. Updated project version to 0.1.2 to reflect the fix.
This commit is contained in:
parent
bf909c5efb
commit
79f1779ac3
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ allow-direct-references = true
|
|||
|
||||
[project]
|
||||
name = "matrix-supportbot"
|
||||
version = "0.1.1"
|
||||
version = "0.1.2"
|
||||
|
||||
authors = [{ name = "Private.coffee Team", email = "support@private.coffee" }]
|
||||
|
||||
|
|
|
@ -183,8 +183,8 @@ class SupportBot:
|
|||
|
||||
async def close_ticket(self, room, sender, command):
|
||||
parts = command.split()
|
||||
if len(parts) == 2:
|
||||
ticket_id = parts[1]
|
||||
if len(parts) == 3:
|
||||
ticket_id = parts[2]
|
||||
else:
|
||||
ticket_id = await self.get_ticket_id_from_room(room.room_id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue