diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-02-25 11:27:24 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-02-25 11:27:24 +0900 |
commit | 93876f06b6a1929dc757595ba4410b742402b7ab (patch) | |
tree | b93c262b56e505629608161cad98d69817324ce3 | |
parent | 6636e46a2e9049f261b8a64cb6c1bf7c4f076c54 (diff) | |
download | libquotient-93876f06b6a1929dc757595ba4410b742402b7ab.tar.gz libquotient-93876f06b6a1929dc757595ba4410b742402b7ab.zip |
Room::postHtmlMessage: default message type to m.text
postHtmlText becomes just a synonym for 2-arg postHtmlMessage (hopefully
at least this doesn't confuse QML that is generally terrible at
resolving overloads).
-rw-r--r-- | lib/room.cpp | 4 | ||||
-rw-r--r-- | lib/room.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 7e7d8505..c7723832 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1525,7 +1525,7 @@ QString Room::postPlainText(const QString& plainText) } QString Room::postHtmlMessage(const QString& plainText, const QString& html, - MessageEventType type) + MessageEventType type) { return d->sendEvent<RoomMessageEvent>(plainText, type, new EventContent::TextContent(html, QStringLiteral("text/html"))); @@ -1533,7 +1533,7 @@ QString Room::postHtmlMessage(const QString& plainText, const QString& html, QString Room::postHtmlText(const QString& plainText, const QString& html) { - return postHtmlMessage(plainText, html, MessageEventType::Text); + return postHtmlMessage(plainText, html); } QString Room::postFile(const QString& plainText, const QUrl& localPath, @@ -385,7 +385,8 @@ namespace QMatrixClient QString postMessage(const QString& plainText, MessageEventType type); QString postPlainText(const QString& plainText); QString postHtmlMessage(const QString& plainText, - const QString& html, MessageEventType type); + const QString& html, + MessageEventType type = MessageEventType::Text); QString postHtmlText(const QString& plainText, const QString& html); QString postFile(const QString& plainText, const QUrl& localPath, bool asGenericFile = false); |