Disable legacy media request fallbacks by default.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-27 02:48:55 +00:00
parent 4c35bfbda4
commit 6b7bf80de5
3 changed files with 18 additions and 2 deletions

View File

@@ -35,7 +35,9 @@ pub async fn fetch_remote_thumbnail(
.fetch_thumbnail_authenticated(mxc, user, server, timeout_ms, dim)
.await;
if let Err(Error::Request(NotFound, ..)) = &result {
if let Err(Error::Request(NotFound, ..)) = &result
&& self.services.server.config.request_legacy_media
{
return self
.fetch_thumbnail_unauthenticated(mxc, user, server, timeout_ms, dim)
.await;
@@ -58,7 +60,9 @@ pub async fn fetch_remote_content(
.fetch_content_authenticated(mxc, user, server, timeout_ms)
.await;
if let Err(Error::Request(NotFound, ..)) = &result {
if let Err(Error::Request(NotFound, ..)) = &result
&& self.services.server.config.request_legacy_media
{
return self
.fetch_content_unauthenticated(mxc, user, server, timeout_ms)
.await;