mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 01:00:12 +00:00
fix(bot): strip excessive linefeeds in reply embed generation
This commit is contained in:
parent
e0c6839cd2
commit
2b7f510e17
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue