aboutsummaryrefslogtreecommitdiff
path: root/user.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-23 15:40:54 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-24 15:12:26 +0900
commitf7ee38b6c1d6c809feddd91647d83e6c6fdd3837 (patch)
treeb159a9425428023c2f437bfcaba18ed207fee471 /user.cpp
parent962f7f4beb192810afe82bfd4b68613a96a69063 (diff)
downloadlibquotient-f7ee38b6c1d6c809feddd91647d83e6c6fdd3837.tar.gz
libquotient-f7ee38b6c1d6c809feddd91647d83e6c6fdd3837.zip
Dealing with direct chats
Receiving and caching m.direct (and other non-room account data along the way); Connection::addToDirectChats/removeFromDirectChats (might get siblings in Room eventually but not now), Connection/User::requestDirectChat. Closes #163.
Diffstat (limited to 'user.cpp')
-rw-r--r--user.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/user.cpp b/user.cpp
index cfcb2f4d..7a6dbc73 100644
--- a/user.cpp
+++ b/user.cpp
@@ -287,6 +287,12 @@ bool User::setAvatar(QIODevice* source)
std::bind(&Private::setAvatarOnServer, d.data(), _1, this));
}
+void User::requestDirectChat()
+{
+ Q_ASSERT(d->connection);
+ d->connection->requestDirectChat(d->userId);
+}
+
void User::Private::setAvatarOnServer(QString contentUri, User* q)
{
auto* j = connection->callApi<SetAvatarUrlJob>(userId, contentUri);