diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-26 08:05:01 -0400 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-03-26 08:05:01 -0400 |
commit | 93dc89d9353e9f30d42528d8ffaba992f58139aa (patch) | |
tree | 4a3c4e74f5f157002fb3f32baaa4f911655c3d3c | |
parent | de05579f18a5c264fe0dbea68ea83abcff526d00 (diff) | |
download | libquotient-93dc89d9353e9f30d42528d8ffaba992f58139aa.tar.gz libquotient-93dc89d9353e9f30d42528d8ffaba992f58139aa.zip |
Room: isDirectChat() and directChatUsers()
isDirectChat() has been declared previously but not implemented, hence a
bit of strangeness in the commit.
-rw-r--r-- | room.cpp | 10 | ||||
-rw-r--r-- | room.h | 3 |
2 files changed, 13 insertions, 0 deletions
@@ -631,6 +631,16 @@ bool Room::isLowPriority() const return d->tags.contains(LowPriorityTag); } +bool Room::isDirectChat() const +{ + return connection()->isDirectChat(id()); +} + +QList<const User*> Room::directChatUsers() const +{ + return connection()->directChatUsers(this); +} + const RoomMessageEvent* Room::Private::getEventWithFile(const QString& eventId) const { @@ -269,6 +269,9 @@ namespace QMatrixClient /** Check whether this room is a direct chat */ bool isDirectChat() const; + /** Get the list of users this room is a direct chat with */ + QList<const User*> directChatUsers() const; + Q_INVOKABLE QUrl urlToThumbnail(const QString& eventId); Q_INVOKABLE QUrl urlToDownload(const QString& eventId); Q_INVOKABLE QString fileNameToDownload(const QString& eventId); |