diff options
Diffstat (limited to 'connection.cpp')
-rw-r--r-- | connection.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/connection.cpp b/connection.cpp index 8d916280..9664521c 100644 --- a/connection.cpp +++ b/connection.cpp @@ -23,6 +23,7 @@ #include "events/event.h" #include "room.h" #include "jobs/passwordlogin.h" +#include "jobs/logoutjob.h" #include "jobs/geteventsjob.h" #include "jobs/postmessagejob.h" #include "jobs/postreceiptjob.h" @@ -98,6 +99,13 @@ void Connection::reconnect() loginJob->start(); } +void Connection::logout() +{ + auto job = new LogoutJob(d->data); + connect( job, &LogoutJob::success, this, &Connection::loggedOut); + job->start(); +} + SyncJob* Connection::sync(int timeout) { QString filter = "{\"room\": { \"timeline\": { \"limit\": 100 } } }"; |