mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-26 02:17:34 +00:00
fix: Add an experiment for MSC4556
This commit is contained in:
4 files changed
+39
-3
No files matched your search
@@ -7,7 +7,9 @@ use std::{
|
||||
|
||||
use axum::extract::State;
|
||||
use conduwuit::{
|
||||
Err, Result, debug, debug_info, error,
|
||||
Err, Result,
|
||||
config::experiments::ToggledExperiment,
|
||||
debug, debug_info, error,
|
||||
utils::{
|
||||
ReadyExt,
|
||||
stream::{BroadbandExt, automatic_width},
|
||||
@@ -103,7 +105,7 @@ async fn query_inner(
|
||||
.values()
|
||||
.fold(0_usize, |acc, q| acc.saturating_add(q.len().max(1)));
|
||||
|
||||
if !v2 {
|
||||
if !v2 && services.config.experiments.msc4556.is_enabled() {
|
||||
// If we're on the v3 endpoint, we can apply these limits explicitly.
|
||||
if total_queried_servers > MAX_SERVERS_PER_QUERY {
|
||||
return Err!(Request(TooLarge(
|
||||
|
||||
Reference in new issue
Block a user