mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
little cleaning
This commit is contained in:
parent
8a40b9e6bc
commit
a533c25efd
@ -846,7 +846,7 @@ class ProxyDaemon:
|
||||
self.store.save_media(self.name, media)
|
||||
|
||||
try:
|
||||
response, decrypted_file, error = await self._load_media(mxc_server, mxc_path, file_name, request)
|
||||
response, decrypted_file = await self._load_media(mxc_server, mxc_path, file_name, request)
|
||||
|
||||
if response is None and decrypted_file is None:
|
||||
return await self.forward_to_web(request, token=client.access_token)
|
||||
@ -865,10 +865,10 @@ class ProxyDaemon:
|
||||
encrypt=False,
|
||||
)
|
||||
|
||||
if not isinstance(decrypted_upload[0], UploadResponse):
|
||||
if not isinstance(decrypted_upload, UploadResponse):
|
||||
raise ValueError
|
||||
|
||||
content["url"] = decrypted_upload[0].content_uri
|
||||
content["url"] = decrypted_upload.content_uri
|
||||
|
||||
return content
|
||||
|
||||
@ -1182,7 +1182,7 @@ class ProxyDaemon:
|
||||
file_name = request.match_info.get("file_name")
|
||||
|
||||
try:
|
||||
response, decrypted_file, error = await self._load_media(server_name, media_id, file_name, request)
|
||||
response, decrypted_file = await self._load_media(server_name, media_id, file_name, request)
|
||||
|
||||
if response is None and decrypted_file is None:
|
||||
return await self.forward_to_web(request)
|
||||
|
Loading…
Reference in New Issue
Block a user