From 2b7f510e17849bfcdf2a3af19db6531d7c6760c9 Mon Sep 17 00:00:00 2001 From: Iris System Date: Tue, 11 Mar 2025 11:22:18 +1300 Subject: [PATCH] fix(bot): strip excessive linefeeds in reply embed generation --- PluralKit.Bot/Proxy/ProxyService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PluralKit.Bot/Proxy/ProxyService.cs b/PluralKit.Bot/Proxy/ProxyService.cs index ead5f1a6..43e1ed5e 100644 --- a/PluralKit.Bot/Proxy/ProxyService.cs +++ b/PluralKit.Bot/Proxy/ProxyService.cs @@ -399,6 +399,10 @@ public class ProxyService if (hasContent) { var msg = repliedTo.Content; + + // strip out overly excessive line breaks + msg = Regex.Replace(msg, @"(?:(?:([_\*]) \1)?\n){2,}", "\n"); + if (msg.Length > 100) { msg = repliedTo.Content.Substring(0, 100);