diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 52d5628..04ea925 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -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)