Move back to plain text

This commit is contained in:
Carl Schwan
2020-12-04 21:24:58 +01:00
parent bdaf661399
commit 7ed41a8f68
3 changed files with 9 additions and 12 deletions

View File

@@ -167,13 +167,13 @@ QVariantMap ChatDocumentHandler::getAutocompletionInfo()
};
}
void ChatDocumentHandler::postMessage(const QString &attachementPath, const QString &replyEventId) const
void ChatDocumentHandler::postMessage(const QString &text, const QString &attachementPath, const QString &replyEventId) const
{
if (!m_room || !m_document) {
return;
}
QString cleanedText = m_document->textDocument()->toMarkdown();
QString cleanedText = text;
cleanedText = cleanedText.trimmed();

View File

@@ -51,7 +51,7 @@ public:
[[nodiscard]] NeoChatRoom *room() const;
void setRoom(NeoChatRoom *room);
Q_INVOKABLE void postMessage(const QString &attachementPath, const QString &replyEventId) const;
Q_INVOKABLE void postMessage(const QString &text, const QString &attachementPath, const QString &replyEventId) const;
/// This function will look at the current QTextCursor and determine if there
/// is the posibility to autocomplete it.