mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Don't use formatted body without format
This commit is contained in:
parent
09e9cffcae
commit
a9e321e38f
1 changed files with 4 additions and 2 deletions
|
@ -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 "";
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue