diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index 3744a95a0f8..e35ccb69d16 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "6.2.0" +#define TGS_DMAPI_VERSION "6.3.0" // 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/__interop_version.dm b/code/modules/tgs/v5/__interop_version.dm index 4add7374ad7..d0ac7e92ead 100644 --- a/code/modules/tgs/v5/__interop_version.dm +++ b/code/modules/tgs/v5/__interop_version.dm @@ -1 +1 @@ -"5.4.0" +"5.5.0" diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm index 36610b1242a..0e75b0de1c4 100644 --- a/code/modules/tgs/v5/api.dm +++ b/code/modules/tgs/v5/api.dm @@ -99,9 +99,10 @@ /datum/tgs_api/v5/proc/TopicResponse(error_message = null) var/list/response = list() - response[DMAPI5_RESPONSE_ERROR_MESSAGE] = error_message - - return json_encode(response) + if(error_message) + response[DMAPI5_RESPONSE_ERROR_MESSAGE] = error_message + return json_encode(response) + return "{}" /datum/tgs_api/v5/OnTopic(T) RequireInitialBridgeResponse() @@ -128,9 +129,12 @@ switch(command) if(DMAPI5_TOPIC_COMMAND_CHAT_COMMAND) + intercepted_message_queue = list() 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 + intercepted_message_queue = null return result if(DMAPI5_TOPIC_COMMAND_EVENT_NOTIFICATION) intercepted_message_queue = list() diff --git a/code/modules/tgs/v5/serializers.dm b/code/modules/tgs/v5/serializers.dm index 38814e2d9f5..7f9bc731b79 100644 --- a/code/modules/tgs/v5/serializers.dm +++ b/code/modules/tgs/v5/serializers.dm @@ -43,6 +43,13 @@ . = ..() .["iconUrl"] = icon_url .["proxyIconUrl"] = proxy_icon_url + +/datum/tgs_chat_embed/footer/_interop_serialize() + return list( + "text" = text, + "iconUrl" = icon_url, + "proxyIconUrl" = proxy_icon_url + ) /datum/tgs_chat_embed/field/_interop_serialize() return list(