Skip to content

Commit

Permalink
Fixed another bug if a channel was not properly deleted on close
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlOfDuty committed Dec 6, 2020
1 parent b77198d commit 5a49769
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SupportBoi/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,9 @@ public static void ArchiveTicket(Ticket ticket)
{
using (MySqlConnection c = GetConnection())
{
MySqlCommand deleteTicket = new MySqlCommand(@"DELETE FROM ticket_history WHERE id=@id", c);
MySqlCommand deleteTicket = new MySqlCommand(@"DELETE FROM ticket_history WHERE id=@id OR channel_id=@channel_id", c);
deleteTicket.Parameters.AddWithValue("@id", ticket.id);
deleteTicket.Parameters.AddWithValue("@channel_id", ticket.channelID);

c.Open();
deleteTicket.Prepare();
Expand Down

0 comments on commit 5a49769

Please sign in to comment.