mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-09 14:39:34 -05:00
CR fixes
This commit is contained in:
parent
3d319b1247
commit
3d1a807f7e
@ -1197,17 +1197,6 @@ class ProxyDaemon:
|
|||||||
if not client:
|
if not client:
|
||||||
return self._unknown_token
|
return self._unknown_token
|
||||||
|
|
||||||
room_id = request.match_info["room_id"]
|
|
||||||
|
|
||||||
# The room is not in the joined rooms list, just forward it.
|
|
||||||
try:
|
|
||||||
room = client.rooms[room_id]
|
|
||||||
encrypt = room.encrypted
|
|
||||||
except KeyError:
|
|
||||||
return await self.forward_to_web(request, token=client.access_token)
|
|
||||||
|
|
||||||
# The room isn't encrypted just forward the message.
|
|
||||||
if not encrypt:
|
|
||||||
try:
|
try:
|
||||||
content = await request.json()
|
content = await request.json()
|
||||||
except (JSONDecodeError, ContentTypeError):
|
except (JSONDecodeError, ContentTypeError):
|
||||||
@ -1219,8 +1208,6 @@ class ProxyDaemon:
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
return await self.forward_to_web(request, token=client.access_token)
|
return await self.forward_to_web(request, token=client.access_token)
|
||||||
|
|
||||||
return await self.forward_to_web(request, token=client.access_token)
|
|
||||||
|
|
||||||
async def download(self, request):
|
async def download(self, request):
|
||||||
server_name = request.match_info["server_name"]
|
server_name = request.match_info["server_name"]
|
||||||
media_id = request.match_info["media_id"]
|
media_id = request.match_info["media_id"]
|
||||||
|
@ -97,7 +97,7 @@ async def init(data_dir, server_conf, send_queue, recv_queue):
|
|||||||
r"/_matrix/media/r0/upload",
|
r"/_matrix/media/r0/upload",
|
||||||
proxy.upload,
|
proxy.upload,
|
||||||
),
|
),
|
||||||
web.post(
|
web.put(
|
||||||
r"/_matrix/client/r0/profile/{userId}/avatar_url",
|
r"/_matrix/client/r0/profile/{userId}/avatar_url",
|
||||||
proxy.profile,
|
proxy.profile,
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user