Fix html messages sent as just plain text

This commit is contained in:
Nicolas Werner 2020-02-20 17:09:49 +01:00
parent eba02dd2e6
commit fcaec0d099

View file

@ -195,7 +195,7 @@ TimelineViewManager::queueTextMessage(const QString &msg, const std::optional<Re
text.formatted_body = utils::markdownToHtml(msg).toStdString(); text.formatted_body = utils::markdownToHtml(msg).toStdString();
// Don't send formatted_body, when we don't need to // Don't send formatted_body, when we don't need to
if (text.formatted_body == text.body) if (text.formatted_body.find("<") == std::string::npos)
text.formatted_body = ""; text.formatted_body = "";
else else
text.format = "org.matrix.custom.html"; text.format = "org.matrix.custom.html";