aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-25 11:27:24 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-25 11:27:24 +0900
commit93876f06b6a1929dc757595ba4410b742402b7ab (patch)
treeb93c262b56e505629608161cad98d69817324ce3
parent6636e46a2e9049f261b8a64cb6c1bf7c4f076c54 (diff)
downloadlibquotient-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.cpp4
-rw-r--r--lib/room.h3
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,
diff --git a/lib/room.h b/lib/room.h
index 808c6074..a9341bd2 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -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);