diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-05-04 12:12:07 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-05-04 13:27:28 +0900 |
commit | 4cbe1a5fe9b0ae17e89425c3127db2af9b328320 (patch) | |
tree | 70e88c522a412d4502fcf439907304abe2990bdc /lib/user.cpp | |
parent | 28a0d70164e2596d306521cd18d25c0e8c0b5336 (diff) | |
download | libquotient-4cbe1a5fe9b0ae17e89425c3127db2af9b328320.tar.gz libquotient-4cbe1a5fe9b0ae17e89425c3127db2af9b328320.zip |
Preempt job/setroomstatejob.* with jobs/generated/room_state.*
The template part (not exposed in the auto-generated class) goes to Room::Private::requestSetState(). Also, Room::setMemberState() to interface with User class.
Diffstat (limited to 'lib/user.cpp')
-rw-r--r-- | lib/user.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/user.cpp b/lib/user.cpp index 89e324f9..5c380424 100644 --- a/lib/user.cpp +++ b/lib/user.cpp @@ -23,7 +23,7 @@ #include "avatar.h" #include "events/event.h" #include "events/roommemberevent.h" -#include "jobs/setroomstatejob.h" +#include "jobs/generated/room_state.h" #include "jobs/generated/profile.h" #include "jobs/generated/content-repo.h" @@ -277,8 +277,7 @@ void User::rename(const QString& newName, const Room* r) "Attempt to rename a user that's not a room member"); MemberEventContent evtC; evtC.displayName = newName; - auto job = d->connection->callApi<SetRoomStateJob>( - r->id(), id(), RoomMemberEvent(move(evtC))); + auto job = r->setMemberState(id(), RoomMemberEvent(move(evtC))); connect(job, &BaseJob::success, this, [=] { updateName(newName, r); }); } |