mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 13:36:50 +01:00
WIP
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#define DMAPI5_PARAM_DEPLOYMENT_INFORMATION_FILE "tgs_json"
|
||||
#define DMAPI5_PARAM_RUNTIME_INFORMATION_FILE "tgs_json"
|
||||
#define DMAPI5_TOPIC_DATA "data"
|
||||
|
||||
#define DMAPI5_BRIDGE_COMMAND_NEW_PORT 0
|
||||
@@ -16,4 +16,25 @@
|
||||
|
||||
#define DMAPI5_BRIDGE_RESPONSE_ERROR_MESSAGE "errorMessage"
|
||||
#define DMAPI5_BRIDGE_RESPONSE_ERROR_NEW_PORT "newPort"
|
||||
#de
|
||||
|
||||
#define DMAPI5_CHAT_MESSAGE_TEXT "text"
|
||||
#define DMAPI5_CHAT_MESSAGE_CHANNEL_IDS "channelIds"
|
||||
|
||||
#define DMAPI5_RUNTIME_INFORMATION_ACCESS_IDENTIFIER "accessIdentifier"
|
||||
#define DMAPI5_RUNTIME_INFORMATION_SERVER_VERSION "serverVersion"
|
||||
#define DMAPI5_RUNTIME_INFORMATION_SERVER_PORT "serverPort"
|
||||
#define DMAPI5_RUNTIME_INFORMATION_API_VALIDATE_ONLY "apiValidateOnly"
|
||||
#define DMAPI5_RUNTIME_INFORMATION_INSTANCE_NAME "instanceName"
|
||||
#define DMAPI5_RUNTIME_INFORMATION_REVISION "revision"
|
||||
#define DMAPI5_RUNTIME_INFORMATION_TEST_MERGES "testMerges"
|
||||
|
||||
#define DMAPI5_TEST_MERGE_TIME_MERGED "timeMerged"
|
||||
#define DMAPI5_TEST_MERGE_REVISION "revision"
|
||||
#define DMAPI5_TEST_MERGE_TITLE_AT_MERGE "titleAtMerge"
|
||||
#define DMAPI5_TEST_MERGE_BODY_AT_MERGE "bodyAtMerge"
|
||||
#define DMAPI5_TEST_MERGE_URL "url"
|
||||
#define DMAPI5_TEST_MERGE_AUTHOR "author"
|
||||
|
||||
#define DMAPI5_CHAT_COMMAND_NAME "name"
|
||||
#define DMAPI5_CHAT_COMMAND_PARAMS "params"
|
||||
#defin
|
||||
@@ -4,7 +4,7 @@ namespace Tgstation.Server.Host.Components.Interop.Bridge
|
||||
{
|
||||
public sealed class ChatMessage
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public string Text { get; set; }
|
||||
|
||||
public ICollection<ulong> ChannelIds { get; set; }
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
/// <summary>
|
||||
/// The command name
|
||||
/// </summary>
|
||||
public string Command { get; }
|
||||
public string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The command params
|
||||
@@ -27,12 +27,12 @@ namespace Tgstation.Server.Host.Components.Interop.Topic
|
||||
/// Initializes a new instance of the <see cref="ChatCommand"/> <see langword="class"/>.
|
||||
/// </summary>
|
||||
/// <param name="user">The value of <see cref="User"/>.</param>
|
||||
/// <param name="command">The value of <see cref="Command"/>.</param>
|
||||
/// <param name="command">The value of <see cref="Name"/>.</param>
|
||||
/// <param name="parameters">The value of <see cref="Parames"/>.</param>
|
||||
public ChatCommand(User user, string command, string parameters)
|
||||
{
|
||||
User = user ?? throw new ArgumentNullException(nameof(user));
|
||||
Command = command ?? throw new ArgumentNullException(nameof(command));
|
||||
Name = command ?? throw new ArgumentNullException(nameof(command));
|
||||
Params = parameters ?? throw new ArgumentNullException(nameof(parameters));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,14 +316,14 @@ namespace Tgstation.Server.Host.Components.Watchdog
|
||||
ErrorMessage = "Missing channelIds field in chatMessage!"
|
||||
};
|
||||
|
||||
if (parameters.ChatMessage.Message == null)
|
||||
if (parameters.ChatMessage.Text == null)
|
||||
return new BridgeResponse
|
||||
{
|
||||
ErrorMessage = "Missing message field in chatMessage!"
|
||||
};
|
||||
|
||||
await chat.SendMessage(
|
||||
parameters.ChatMessage.Message,
|
||||
parameters.ChatMessage.Text,
|
||||
parameters.ChatMessage.ChannelIds,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
|
||||
namespace Tgstation.Server.Host.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user