fix(bot): strip excessive linefeeds in reply embed generation

This commit is contained in:
Iris System 2025-03-11 11:22:18 +13:00
parent e0c6839cd2
commit 2b7f510e17

View file

@ -399,6 +399,10 @@ public class ProxyService
if (hasContent) if (hasContent)
{ {
var msg = repliedTo.Content; var msg = repliedTo.Content;
// strip out overly excessive line breaks
msg = Regex.Replace(msg, @"(?:(?:([_\*]) \1)?\n){2,}", "\n");
if (msg.Length > 100) if (msg.Length > 100)
{ {
msg = repliedTo.Content.Substring(0, 100); msg = repliedTo.Content.Substring(0, 100);