From cc6c813f6dad30d9d21652d76a01cd840e9db998 Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Mon, 23 Oct 2023 15:06:46 +0200 Subject: [PATCH] fix(ahelp): Makes pressing "handle" actually use webhook Changes webhook set-up for ahelp "handleissue" from https://github.com/VOREStation/VOREStation/blame/f61f90b9e7596019705abf96ad1bac8a127c936f/code/modules/admin/verbs/adminhelp.dm#L413 to https://github.com/VOREStation/VOREStation/blame/f61f90b9e7596019705abf96ad1bac8a127c936f/code/modules/admin/topic.dm#L1348 This was done as it was discovered the fax machine "take_question" actually sends to discord. TODO: Standardizing whether we use world.Export() or SSwebhooks, if later fix SSWebhooks --- code/modules/admin/verbs/adminhelp.dm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 54ddd8894b..30dc872bb9 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -424,13 +424,14 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) message_admins(msg) log_admin(msg) AddInteraction("[key_name_admin(usr)] is now handling this ticket.") - SSwebhooks.send( - WEBHOOK_AHELP_SENT, - list( - "name" = "Ticket ([id]) (Game ID: [game_id]) being handled.", - "body" = "[key_name(usr)] is now handling the ticket." - ) - ) + var/query_string = "type=admintake" + query_string += "&key=[url_encode(config.chat_webhook_key)]" + query_string += "&admin=[url_encode(key_name_admin(usr))]" + query_string += "&user=[url_encode(key_name(initiator))]" + world.Export("[config.chat_webhook_url]?[query_string]") + + + //Show the ticket panel /datum/admin_help/proc/TicketPanel()