aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-10-04 18:48:12 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-10-04 18:48:12 +0200
commitf89285a3bd7c093622be966823d0ae1254822905 (patch)
tree96aba4587de5a272c1bb8a1dd74159fc4b6a5ab6 /lib
parent1fd25fe944b67c55435ed4d4d8fd1cbb0989bb5f (diff)
downloadlibquotient-f89285a3bd7c093622be966823d0ae1254822905.tar.gz
libquotient-f89285a3bd7c093622be966823d0ae1254822905.zip
Room: use more modern Connection API
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index fb65fd84..a923bf9a 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -1180,9 +1180,8 @@ QUrl Room::urlToThumbnail(const QString& eventId) const
if (event->hasThumbnail()) {
auto* thumbnail = event->content()->thumbnailInfo();
Q_ASSERT(thumbnail != nullptr);
- return MediaThumbnailJob::makeRequestUrl(connection()->homeserver(),
- thumbnail->url,
- thumbnail->imageSize);
+ return connection()->getUrlForApi<MediaThumbnailJob>(
+ thumbnail->url, thumbnail->imageSize);
}
qCDebug(MAIN) << "Event" << eventId << "has no thumbnail";
return {};
@@ -1193,8 +1192,7 @@ QUrl Room::urlToDownload(const QString& eventId) const
if (auto* event = d->getEventWithFile(eventId)) {
auto* fileInfo = event->content()->fileInfo();
Q_ASSERT(fileInfo != nullptr);
- return DownloadFileJob::makeRequestUrl(connection()->homeserver(),
- fileInfo->url);
+ return connection()->getUrlForApi<DownloadFileJob>(fileInfo->url);
}
return {};
}