mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 20:47:28 +01:00
Merge branch 'dev' of https://github.com/tgstation/tgstation-server into FixesNSHit
This commit is contained in:
@@ -224,9 +224,18 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
public override async Task SendMessage(Message replyTo, MessageContent message, ulong channelId, CancellationToken cancellationToken)
|
||||
{
|
||||
Optional<IMessageReference> replyToReference = default;
|
||||
Optional<IAllowedMentions> allowedMentions = default;
|
||||
if (replyTo != null && replyTo is DiscordMessage discordMessage)
|
||||
{
|
||||
replyToReference = discordMessage.MessageReference;
|
||||
allowedMentions = new AllowedMentions(
|
||||
Parse: new List<MentionType> // reset settings back to how discord acts if this is not passed (which is different than the default if empty)
|
||||
{
|
||||
MentionType.Everyone,
|
||||
MentionType.Roles,
|
||||
MentionType.Users,
|
||||
},
|
||||
MentionRepliedUser: false); // disable reply mentions
|
||||
}
|
||||
|
||||
var embeds = ConvertEmbed(message.Embed);
|
||||
@@ -239,6 +248,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
message.Text,
|
||||
embeds: embeds,
|
||||
messageReference: replyToReference,
|
||||
allowedMentions: allowedMentions,
|
||||
ct: cancellationToken);
|
||||
|
||||
if (!result.IsSuccess)
|
||||
|
||||
Reference in New Issue
Block a user