From edcadde8423e55cca67b4fb07a2f6cbe5fddc1f4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 9 Apr 2023 21:01:00 +0200 Subject: [PATCH] [MIRROR] Automatic TGS DMAPI Update [MDB IGNORE] (#20402) Automatic TGS DMAPI Update (#74584) This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging. Co-authored-by: orange man <61334995+comfyorange@users.noreply.github.com> Co-authored-by: tgstation-server --- code/__DEFINES/tgs.dm | 2 +- code/modules/tgs/v5/api.dm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index e35ccb69d16..80df9d1d54e 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "6.3.0" +#define TGS_DMAPI_VERSION "6.3.1" // All functions and datums outside this document are subject to change with any version and should not be relied on. diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm index 0e75b0de1c4..4bf593f35d3 100644 --- a/code/modules/tgs/v5/api.dm +++ b/code/modules/tgs/v5/api.dm @@ -133,7 +133,11 @@ var/result = HandleCustomCommand(topic_parameters[DMAPI5_TOPIC_PARAMETER_CHAT_COMMAND]) if(!result) result = TopicResponse("Error running chat command!") - result[DMAPI5_TOPIC_RESPONSE_CHAT_RESPONSES] = intercepted_message_queue + //TODO: make this not need the decode/encode. + if (length(intercepted_message_queue)) + var/list/result_array = json_decode(result) + result_array[DMAPI5_TOPIC_RESPONSE_CHAT_RESPONSES] = intercepted_message_queue + result = json_encode(result_array) intercepted_message_queue = null return result if(DMAPI5_TOPIC_COMMAND_EVENT_NOTIFICATION)