fix(bot): correct ticket ID parsing logic
All checks were successful
Python Package CI/CD / Setup and Test (push) Successful in 1m10s
Python Package CI/CD / Publish to PyPI (push) Successful in 1m12s

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:
Kumi 2024-08-18 19:24:11 +02:00
parent bf909c5efb
commit 79f1779ac3
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@ allow-direct-references = true
[project] [project]
name = "matrix-supportbot" name = "matrix-supportbot"
version = "0.1.1" version = "0.1.2"
authors = [{ name = "Private.coffee Team", email = "support@private.coffee" }] authors = [{ name = "Private.coffee Team", email = "support@private.coffee" }]

View file

@ -183,8 +183,8 @@ class SupportBot:
async def close_ticket(self, room, sender, command): async def close_ticket(self, room, sender, command):
parts = command.split() parts = command.split()
if len(parts) == 2: if len(parts) == 3:
ticket_id = parts[1] ticket_id = parts[2]
else: else:
ticket_id = await self.get_ticket_id_from_room(room.room_id) ticket_id = await self.get_ticket_id_from_room(room.room_id)