mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
request auth media first
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
2d71d5590a
commit
565837ad75
1 changed files with 4 additions and 4 deletions
|
@ -32,12 +32,12 @@ pub async fn fetch_remote_thumbnail(
|
|||
self.check_fetch_authorized(mxc)?;
|
||||
|
||||
let result = self
|
||||
.fetch_thumbnail_unauthenticated(mxc, user, server, timeout_ms, dim)
|
||||
.fetch_thumbnail_authenticated(mxc, user, server, timeout_ms, dim)
|
||||
.await;
|
||||
|
||||
if let Err(Error::Request(NotFound, ..)) = &result {
|
||||
return self
|
||||
.fetch_thumbnail_authenticated(mxc, user, server, timeout_ms, dim)
|
||||
.fetch_thumbnail_unauthenticated(mxc, user, server, timeout_ms, dim)
|
||||
.await;
|
||||
}
|
||||
|
||||
|
@ -55,12 +55,12 @@ pub async fn fetch_remote_content(
|
|||
self.check_fetch_authorized(mxc)?;
|
||||
|
||||
let result = self
|
||||
.fetch_content_unauthenticated(mxc, user, server, timeout_ms)
|
||||
.fetch_content_authenticated(mxc, user, server, timeout_ms)
|
||||
.await;
|
||||
|
||||
if let Err(Error::Request(NotFound, ..)) = &result {
|
||||
return self
|
||||
.fetch_content_authenticated(mxc, user, server, timeout_ms)
|
||||
.fetch_content_unauthenticated(mxc, user, server, timeout_ms)
|
||||
.await;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue