summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-11-20 03:51:44 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-11-20 03:51:58 +0100
commit5b929c9d1aee9e0ce4c16e86718c13e0c319f36c (patch)
treea07fd7a69847869d237af16fefcbeed3531331e7 /src
parentTranslated using Weblate (German) (diff)
downloadnheko-5b929c9d1aee9e0ce4c16e86718c13e0c319f36c.tar.xz
Enable http/3 support
Diffstat (limited to 'src')
-rw-r--r--src/MatrixClient.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp
index e1c890ed..b5ea7609 100644
--- a/src/MatrixClient.cpp
+++ b/src/MatrixClient.cpp
@@ -10,6 +10,7 @@
 
 #include <QMetaType>
 #include <QObject>
+#include <QStandardPaths>
 #include <QString>
 
 #include "nlohmann/json.hpp"
@@ -33,7 +34,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();
 }