Skip to content

Commit

Permalink
Preserve newlines in fallback quote
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Jul 2, 2024
1 parent 7d6cf8f commit 9d5716b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions snikket/ChatMessage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,14 @@ class ChatMessage {
for (line in lines) {
if (!~/^(?:> ?){3,}/.match(line)) {
if (line.charAt(0) == ">") {
quoteText += ">" + line;
quoteText += ">" + line + "\n";
} else {
quoteText += "> " + line;
quoteText += "> " + line + "\n";
}
}
}
final reaction = EmojiUtil.isEmoji(StringTools.trim(body)) ? StringTools.trim(body) : null;
body = quoteText + "\n" + body;
body = quoteText + body;
final replyId = replyToM.isGroupchat ? replyToM.serverId : replyToM.localId;
if (replyId != null) {
final codepoints = StringUtil.codepointArray(quoteText);
Expand Down

0 comments on commit 9d5716b

Please sign in to comment.