aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-04 20:36:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-04 20:36:29 +0900
commit98751495f1990dccf285e3b4739f86de7b7f68fd (patch)
treefc0f220c25c37115d1b8b21057a046bed7723d02 /lib/room.h
parent7298e99125522c4d010ec83052cd10ce085e09b4 (diff)
downloadlibquotient-98751495f1990dccf285e3b4739f86de7b7f68fd.tar.gz
libquotient-98751495f1990dccf285e3b4739f86de7b7f68fd.zip
Room: avoid overloading postMessage, as QML is bad at resolving overloaded slots
Closes #227.
Diffstat (limited to 'lib/room.h')
-rw-r--r--lib/room.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/room.h b/lib/room.h
index 5c7524d6..12884eb4 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -306,18 +306,19 @@ namespace QMatrixClient
void setJoinState( JoinState state );
public slots:
- QString postMessage(const QString& plainText,
- MessageEventType type = MessageEventType::Text);
- QString postHtmlMessage(
- const QString& plainText, const QString& htmlText,
- MessageEventType type = MessageEventType::Text);
- /** Post a pre-created room message event; takes ownership of the event */
- QString postMessage(RoomEvent* event);
- QString postMessage(const QString& matrixType,
- const QJsonObject& eventContent);
- /** @deprecated If you have a custom event type, construct the event
- * and pass it as a whole to postMessage() */
- QString postMessage(const QString& type, const QString& plainText);
+ QString postMessage(const QString& plainText, MessageEventType type);
+ QString postPlainText(const QString& plainText);
+ QString postHtmlMessage(const QString& plainText,
+ const QString& html, MessageEventType type);
+ QString postHtmlText(const QString& plainText, const QString& html);
+ /** Post a pre-created room message event
+ *
+ * Takes ownership of the event, deleting it once the matching one
+ * arrives with the sync
+ */
+ QString postEvent(RoomEvent* event);
+ QString postJson(const QString& matrixType,
+ const QJsonObject& eventContent);
QString retryMessage(const QString& txnId);
void discardMessage(const QString& txnId);
void setName(const QString& newName);