Also apply proper escaping to message question embed.

This commit is contained in:
threeoh6000 2024-08-15 18:20:40 +01:00
parent 54adf8cf12
commit 6d76fb799b
No known key found for this signature in database
GPG key ID: 801FE4AD456E922C

View file

@ -407,8 +407,8 @@ public class EmbedService
// Calculate string displayed under "Sent by"
string userStr;
if (showContent && memberInfo != null && memberInfo.Nick != null)
userStr = $"**Username:** {userInfo.NameAndMention()}\n**Nickname:** {memberInfo.Nick}";
else if (userInfo != null) userStr = userInfo.NameAndMention();
userStr = $"**Username:** {userInfo.NameAndMention().EscapeMarkdownExcludingMentions()}\n**Nickname:** {memberInfo.Nick}";
else if (userInfo != null) userStr = userInfo.NameAndMention().EscapeMarkdownExcludingMentions();
else userStr = $"*(deleted user {msg.Message.Sender})*";
var content = serverMsg?.Content?.NormalizeLineEndSpacing();