diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index 08fcd5e53..6409e3084 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -650,7 +650,6 @@ void NeoChatRoom::postMessage(const QString &rawText, const QString &text, Messa void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, MessageEventType type, const QString &replyEventId, const QString &relateToEventId) { - bool isRichText = Qt::mightBeRichText(html); bool isReply = !replyEventId.isEmpty(); bool isEdit = !relateToEventId.isEmpty(); const auto replyIt = findInTimeline(replyEventId); @@ -696,7 +695,7 @@ void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, Mess "\">In reply to " + replyEvt.senderId() + "
" + eventToString(replyEvt, Qt::RichText) + - "" + (isRichText ? html : text) + "" + html } }; // clang-format on @@ -706,11 +705,7 @@ void NeoChatRoom::postHtmlMessage(const QString &text, const QString &html, Mess return; } - if (isRichText) { - Room::postHtmlMessage(text, html, type); - } else { - Room::postMessage(text, type); - } + Room::postHtmlMessage(text, html, type); } void NeoChatRoom::toggleReaction(const QString &eventId, const QString &reaction)