aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/content-repo.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-31 18:24:53 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-31 18:25:37 +0200
commit42811660094c88a4a1bfa8bd8ace5f4b148c246a (patch)
tree36c7c05f16f3643eaabec75d3e231c1e6bf2a61d /lib/csapi/content-repo.cpp
parentfed831820965ad5654317d5e7df18c23fa75de20 (diff)
downloadlibquotient-42811660094c88a4a1bfa8bd8ace5f4b148c246a.tar.gz
libquotient-42811660094c88a4a1bfa8bd8ace5f4b148c246a.zip
Regenerate API files (FTBFS; see the next commit)
Diffstat (limited to 'lib/csapi/content-repo.cpp')
-rw-r--r--lib/csapi/content-repo.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/csapi/content-repo.cpp b/lib/csapi/content-repo.cpp
index 6d1e38b6..7d740cb7 100644
--- a/lib/csapi/content-repo.cpp
+++ b/lib/csapi/content-repo.cpp
@@ -16,7 +16,7 @@ auto queryToUploadContent(const QString& filename)
UploadContentJob::UploadContentJob(QIODevice* content, const QString& filename,
const QString& contentType)
: BaseJob(HttpVerb::Post, QStringLiteral("UploadContentJob"),
- makePath("/_matrix/media/r0", "/upload"),
+ makePath("/_matrix/media/v3", "/upload"),
queryToUploadContent(filename))
{
setRequestHeader("Content-Type", contentType.toLatin1());
@@ -35,7 +35,7 @@ QUrl GetContentJob::makeRequestUrl(QUrl baseUrl, const QString& serverName,
const QString& mediaId, bool allowRemote)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- makePath("/_matrix/media/r0", "/download/",
+ makePath("/_matrix/media/v3", "/download/",
serverName, "/", mediaId),
queryToGetContent(allowRemote));
}
@@ -43,7 +43,7 @@ QUrl GetContentJob::makeRequestUrl(QUrl baseUrl, const QString& serverName,
GetContentJob::GetContentJob(const QString& serverName, const QString& mediaId,
bool allowRemote)
: BaseJob(HttpVerb::Get, QStringLiteral("GetContentJob"),
- makePath("/_matrix/media/r0", "/download/", serverName, "/",
+ makePath("/_matrix/media/v3", "/download/", serverName, "/",
mediaId),
queryToGetContent(allowRemote), {}, false)
{
@@ -64,7 +64,7 @@ QUrl GetContentOverrideNameJob::makeRequestUrl(QUrl baseUrl,
bool allowRemote)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- makePath("/_matrix/media/r0", "/download/",
+ makePath("/_matrix/media/v3", "/download/",
serverName, "/", mediaId, "/",
fileName),
queryToGetContentOverrideName(allowRemote));
@@ -75,7 +75,7 @@ GetContentOverrideNameJob::GetContentOverrideNameJob(const QString& serverName,
const QString& fileName,
bool allowRemote)
: BaseJob(HttpVerb::Get, QStringLiteral("GetContentOverrideNameJob"),
- makePath("/_matrix/media/r0", "/download/", serverName, "/",
+ makePath("/_matrix/media/v3", "/download/", serverName, "/",
mediaId, "/", fileName),
queryToGetContentOverrideName(allowRemote), {}, false)
{
@@ -101,16 +101,17 @@ QUrl GetContentThumbnailJob::makeRequestUrl(QUrl baseUrl,
{
return BaseJob::makeRequestUrl(
std::move(baseUrl),
- makePath("/_matrix/media/r0", "/thumbnail/", serverName, "/", mediaId),
+ makePath("/_matrix/media/v3", "/thumbnail/", serverName, "/", mediaId),
queryToGetContentThumbnail(width, height, method, allowRemote));
}
GetContentThumbnailJob::GetContentThumbnailJob(const QString& serverName,
- const QString& mediaId, int width,
- int height, const QString& method,
+ const QString& mediaId,
+ int width, int height,
+ const QString& method,
bool allowRemote)
: BaseJob(HttpVerb::Get, QStringLiteral("GetContentThumbnailJob"),
- makePath("/_matrix/media/r0", "/thumbnail/", serverName, "/",
+ makePath("/_matrix/media/v3", "/thumbnail/", serverName, "/",
mediaId),
queryToGetContentThumbnail(width, height, method, allowRemote),
{}, false)
@@ -130,24 +131,24 @@ QUrl GetUrlPreviewJob::makeRequestUrl(QUrl baseUrl, const QUrl& url,
Omittable<qint64> ts)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- makePath("/_matrix/media/r0",
+ makePath("/_matrix/media/v3",
"/preview_url"),
queryToGetUrlPreview(url, ts));
}
GetUrlPreviewJob::GetUrlPreviewJob(const QUrl& url, Omittable<qint64> ts)
: BaseJob(HttpVerb::Get, QStringLiteral("GetUrlPreviewJob"),
- makePath("/_matrix/media/r0", "/preview_url"),
+ makePath("/_matrix/media/v3", "/preview_url"),
queryToGetUrlPreview(url, ts))
{}
QUrl GetConfigJob::makeRequestUrl(QUrl baseUrl)
{
return BaseJob::makeRequestUrl(std::move(baseUrl),
- makePath("/_matrix/media/r0", "/config"));
+ makePath("/_matrix/media/v3", "/config"));
}
GetConfigJob::GetConfigJob()
: BaseJob(HttpVerb::Get, QStringLiteral("GetConfigJob"),
- makePath("/_matrix/media/r0", "/config"))
+ makePath("/_matrix/media/v3", "/config"))
{}