summary refs log tree commit diff
path: root/src/MatrixClient.cpp
diff options
context:
space:
mode:
authorZhymabek Roman <61125068+ZhymabekRoman@users.noreply.github.com>2023-01-02 21:59:29 +0600
committerGitHub <noreply@github.com>2023-01-02 21:59:29 +0600
commit59410a99ac9b5a90356adc2192b8c6107456c78f (patch)
treef42e081641cee3d62057208f3af1de3afddd02e6 /src/MatrixClient.cpp
parentAppImage: reduce package size (diff)
parentA whole new year full of excitement and possibilities! (diff)
downloadnheko-59410a99ac9b5a90356adc2192b8c6107456c78f.tar.xz
Merge branch 'master' into master
Diffstat (limited to 'src/MatrixClient.cpp')
-rw-r--r--src/MatrixClient.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp

index e1c890ed..945a5a73 100644 --- a/src/MatrixClient.cpp +++ b/src/MatrixClient.cpp
@@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: 2021 Nheko Contributors // SPDX-FileCopyrightText: 2022 Nheko Contributors +// SPDX-FileCopyrightText: 2023 Nheko Contributors // // SPDX-License-Identifier: GPL-3.0-or-later @@ -10,6 +11,7 @@ #include <QMetaType> #include <QObject> +#include <QStandardPaths> #include <QString> #include "nlohmann/json.hpp" @@ -33,7 +35,13 @@ namespace http { mtx::http::Client * client() { - static auto client_ = std::make_shared<mtx::http::Client>(); + static auto client_ = [] { + auto c = std::make_shared<mtx::http::Client>(); + c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + + "/curl_alt_svc_cache.txt") + .toStdString()); + return c; + }(); return client_.get(); }