Skip to content

Commit

Permalink
Add extra check for trimming plaintext reply fallback
Browse files Browse the repository at this point in the history
This should avoid most edge cases with messages starting with
blockquotes when reply fallbacks are removed.
  • Loading branch information
tulir committed Jun 23, 2023
1 parent b7a4f77 commit 8a0f888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion event/reply.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TrimReplyFallbackHTML(html string) string {
}

func TrimReplyFallbackText(text string) string {
if !strings.HasPrefix(text, "> ") || !strings.Contains(text, "\n") {
if !strings.HasPrefix(text, "> <") || !strings.Contains(text, "\n") {
return text
}

Expand Down

0 comments on commit 8a0f888

Please sign in to comment.