diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-06-20 19:51:57 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-06-26 13:36:21 +0200 |
commit | a9e321e38fba663f792849b677aa6c815647cb76 (patch) | |
tree | fc48403ea7672edd0d37a08378b63cd8f5560678 | |
parent | Merge pull request #228 from felixonmars/patch-1 (diff) | |
download | nheko-a9e321e38fba663f792849b677aa6c815647cb76.tar.xz |
Don't use formatted body without format
-rw-r--r-- | src/EventAccessors.cpp | 6 |
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 ""; } }; |