mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-07-05 11:54:45 -04:00
use mxc data in send_message
This commit is contained in:
parent
e5922da6ec
commit
5273b83574
1 changed files with 4 additions and 2 deletions
|
@ -19,6 +19,7 @@ import urllib.parse
|
||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
from json import JSONDecodeError
|
from json import JSONDecodeError
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
from urllib.parse import urlparse
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
@ -862,8 +863,9 @@ class ProxyDaemon:
|
||||||
if upload is None:
|
if upload is None:
|
||||||
return await self.forward_to_web(request, token=client.access_token)
|
return await self.forward_to_web(request, token=client.access_token)
|
||||||
|
|
||||||
server_name = request.match_info["server_name"]
|
mxc = urlparse(content_uri)
|
||||||
media_id = content_uri
|
server_name = mxc.netloc.strip("/")
|
||||||
|
media_id = mxc.path.strip("/")
|
||||||
file_name = request.match_info.get("file_name")
|
file_name = request.match_info.get("file_name")
|
||||||
|
|
||||||
response, decrypted_file, error = self._load_media(server_name, media_id, file_name, request)
|
response, decrypted_file, error = self._load_media(server_name, media_id, file_name, request)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue