mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
More DMAPI Fixes [DMDeploy][TGSDeploy]
This commit is contained in:
@@ -256,7 +256,7 @@
|
||||
/datum/tgs_api/v4/Revision()
|
||||
return cached_revision
|
||||
|
||||
/datum/tgs_api/v4/ChatBroadcast(message, list/channels)
|
||||
/datum/tgs_api/v4/ChatBroadcast(datum/tgs_message_content/message, list/channels)
|
||||
var/list/ids
|
||||
if(length(channels))
|
||||
ids = list()
|
||||
@@ -270,7 +270,7 @@
|
||||
else
|
||||
Export(TGS4_COMM_CHAT, message)
|
||||
|
||||
/datum/tgs_api/v4/ChatTargetedBroadcast(message, admin_only)
|
||||
/datum/tgs_api/v4/ChatTargetedBroadcast(datum/tgs_message_content/message, admin_only)
|
||||
var/list/channels = list()
|
||||
for(var/I in ChatChannelInfo())
|
||||
var/datum/tgs_chat_channel/channel = I
|
||||
@@ -283,7 +283,7 @@
|
||||
else
|
||||
Export(TGS4_COMM_CHAT, message)
|
||||
|
||||
/datum/tgs_api/v4/ChatPrivateMessage(message, datum/tgs_chat_user/user)
|
||||
/datum/tgs_api/v4/ChatPrivateMessage(datum/tgs_message_content/message, datum/tgs_chat_user/user)
|
||||
message = UpgradeDeprecatedChatMessage(message)
|
||||
message = list("message" = message.text, "channelIds" = list(user.channel.id))
|
||||
if(intercepted_message_queue)
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
if(sc)
|
||||
var/datum/tgs_message_content/response = sc.Run(u, params)
|
||||
response = UpgradeDeprecatedCommandResponse(response, command)
|
||||
|
||||
|
||||
var/list/topic_response = list()
|
||||
topic_response[DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE] = response?.text
|
||||
topic_response[DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE] = response?._interop_serialize()
|
||||
return json_encode(topic_response)
|
||||
@@ -49,7 +50,6 @@
|
||||
|
||||
return new /datum/tgs_message_content(response)
|
||||
|
||||
var/list/topic_response = list()
|
||||
if(!istype(response))
|
||||
TGS_ERROR_LOG("Custom chat command \"[command]\" should return a [/datum/tgs_message_content]! Got: \"[response]\"")
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user