From a9e321e38fba663f792849b677aa6c815647cb76 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 20 Jun 2020 19:51:57 +0200 Subject: [PATCH] Don't use formatted body without format --- src/EventAccessors.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/EventAccessors.cpp b/src/EventAccessors.cpp index a2d8adb..7071819 100644 --- a/src/EventAccessors.cpp +++ b/src/EventAccessors.cpp @@ -85,8 +85,10 @@ struct EventFormattedBody template std::string operator()(const mtx::events::RoomEvent &e) { - if constexpr (is_detected::value) - return e.content.formatted_body; + if constexpr (is_detected::value) { + if (e.content.format == "org.matrix.custom.html") + return e.content.formatted_body; + } return ""; } };