1 files changed, 4 insertions, 2 deletions
diff --git a/src/EventAccessors.cpp b/src/EventAccessors.cpp
index a2d8adbb..7071819b 100644
--- a/src/EventAccessors.cpp
+++ b/src/EventAccessors.cpp
@@ -85,8 +85,10 @@ struct EventFormattedBody
template<class T>
std::string operator()(const mtx::events::RoomEvent<T> &e)
{
- if constexpr (is_detected<formatted_body_t, T>::value)
- return e.content.formatted_body;
+ if constexpr (is_detected<formatted_body_t, T>::value) {
+ if (e.content.format == "org.matrix.custom.html")
+ return e.content.formatted_body;
+ }
return "";
}
};
|