diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-10-29 12:10:14 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-10-29 12:10:14 +0900 |
commit | 7c7ce3d468af242364efb53e77ed12047b6a5382 (patch) | |
tree | d446c280e8d47027656a6879e49e6250241de0c2 /lib | |
parent | 122ace9815ddf3652287d205809ba9defcc6b63d (diff) | |
download | libquotient-7c7ce3d468af242364efb53e77ed12047b6a5382.tar.gz libquotient-7c7ce3d468af242364efb53e77ed12047b6a5382.zip |
Connection::joinRoom: allow to specify intermediate servers
Closes #127.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connection.cpp | 5 | ||||
-rw-r--r-- | lib/connection.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 3d635a7e..df9fb112 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -422,9 +422,10 @@ PostReceiptJob* Connection::postReceipt(Room* room, RoomEvent* event) const return callApi<PostReceiptJob>(room->id(), "m.read", event->id()); } -JoinRoomJob* Connection::joinRoom(const QString& roomAlias) +JoinRoomJob* Connection::joinRoom(const QString& roomAlias, + const QStringList& serverNames) { - auto job = callApi<JoinRoomJob>(roomAlias); + auto job = callApi<JoinRoomJob>(roomAlias, serverNames); connect(job, &JoinRoomJob::success, this, [this, job] { provideRoom(job->roomId(), JoinState::Join); }); return job; diff --git a/lib/connection.h b/lib/connection.h index cfad8774..b06fb143 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -461,7 +461,8 @@ namespace QMatrixClient CreateRoomJob* createDirectChat(const QString& userId, const QString& topic = {}, const QString& name = {}); - virtual JoinRoomJob* joinRoom(const QString& roomAlias); + virtual JoinRoomJob* joinRoom(const QString& roomAlias, + const QStringList& serverNames = {}); /** Sends /forget to the server and also deletes room locally. * This method is in Connection, not in Room, since it's a |