We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c5a0f commit 2f9654cCopy full SHA for 2f9654c
mautrix/types/event/message.py
@@ -350,14 +350,12 @@ def trim_reply_fallback(self) -> None:
350
setattr(self, "__reply_fallback_trimmed", True)
351
352
def _trim_reply_fallback_text(self) -> None:
353
- if not self.body.startswith("> ") or "\n" not in self.body:
+ if not self.body.startswith("> <") or "\n" not in self.body:
354
return
355
lines = self.body.split("\n")
356
while len(lines) > 0 and lines[0].startswith("> "):
357
lines.pop(0)
358
- # Pop extra newline at end of fallback
359
- lines.pop(0)
360
- self.body = "\n".join(lines)
+ self.body = "\n".join(lines).strip()
361
362
def _trim_reply_fallback_html(self) -> None:
363
if self.formatted_body and self.format == Format.HTML:
0 commit comments