Adapt to libQuotient API changes

This commit is contained in:
Tobias Fella
2021-08-10 17:09:21 +02:00
parent 9e4d0ddc9b
commit e91a4f79a5
5 changed files with 21 additions and 3 deletions

View File

@@ -477,7 +477,11 @@ void NeoChatRoom::changeAvatar(const QUrl &localFile)
if (isJobRunning(job)) {
#endif
connect(job, &BaseJob::success, this, [this, job] {
#ifdef QUOTIENT_07
connection()->callApi<SetRoomStateWithKeyJob>(id(), "m.room.avatar", localUser()->id(), QJsonObject{{"url", job->contentUri().toString()}});
#else
connection()->callApi<SetRoomStateWithKeyJob>(id(), "m.room.avatar", localUser()->id(), QJsonObject{{"url", job->contentUri()}});
#endif
});
}
}