diff --git a/mautrix/types/event/message.py b/mautrix/types/event/message.py index cd9e3a88..6b3f5a13 100644 --- a/mautrix/types/event/message.py +++ b/mautrix/types/event/message.py @@ -336,6 +336,11 @@ def set_reply(self, reply_to: Union['MessageEvent', EventID], + self.formatted_body) self.body = reply_to.make_reply_fallback_text(displayname) + self.body + def formatted(self, format: Format) -> Optional[str]: + if self.format == format: + return self.formatted_body + return None + def trim_reply_fallback(self) -> None: if self.get_reply_to(): self._trim_reply_fallback_text()