guru/net-im/nheko/files/nheko-0.12.0-disable-http3.patch
Anna (cybertailor) Vyalkova 17a4490686
net-im/nheko: add 0.12.0-r2
// Major changes:

* Add a patch to disable HTTP/3 by default.

* Relax requirements for indirect dependencies, which are only checked
  at build time.

* Separate runtime dependencies from build dependencies.

// Notable changes:

* Drop Qt6Concurrency dependency.

* Drop Qt6DeclarativeWidgets dependency.

* Add subslot operators for qtbase and qtdeclarative because private
  APIs are used.

* Do not hard-depend on GStreamer support for QtMultimedia.

* Add gst-plugins-qt6 dependency for video call support.

* Fix GStreamer deps for X11 and Wayland.

// Minor changes:

* Add minimum Qt version restriction.

* Bump minimum GStreamer version.

* Add pkg-config dependency.

* Change IUSE: +man -> man

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2024-12-08 15:22:00 +05:00

46 lines
1.5 KiB
Diff

From 80a39cca177a227e40806e350e7ffbb81adbca88 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Tue, 8 Oct 2024 23:49:29 +0200
Subject: [PATCH] Disable http3 support by default and warn if users enable it
---
src/MatrixClient.cpp | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp
index 05ec6a92..d3141efd 100644
--- a/src/MatrixClient.cpp
+++ b/src/MatrixClient.cpp
@@ -13,6 +13,9 @@
#include <mtx/responses.hpp>
+#include "Logging.h"
+#include "UserSettingsPage.h"
+
namespace http {
mtx::http::Client *
@@ -20,9 +23,15 @@ 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());
+
+ // Disabled by default until CPU usage and reliability improves
+ if (UserSettings::instance()->qsettings()->value("enable_http3").toBool()) {
+ nhlog::net()->warn("Enabling http3 support. This is currently usually a worse "
+ "experience, so you are on your own.");
+ c->alt_svc_cache_path((QStandardPaths::writableLocation(QStandardPaths::CacheLocation) +
+ "/curl_alt_svc_cache.txt")
+ .toStdString());
+ }
return c;
}();
return client_.get();
--
2.47.1