mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-02-02 10:35:10 -05:00
fix bug
This commit is contained in:
parent
8aaa82abf3
commit
3d319b1247
@ -909,14 +909,14 @@ class ProxyDaemon:
|
|||||||
|
|
||||||
msgtype = request.match_info["event_type"]
|
msgtype = request.match_info["event_type"]
|
||||||
|
|
||||||
|
content = ""
|
||||||
|
try:
|
||||||
|
content = await request.json()
|
||||||
|
except (JSONDecodeError, ContentTypeError):
|
||||||
|
return self._not_json
|
||||||
|
|
||||||
# The room isn't encrypted just forward the message.
|
# The room isn't encrypted just forward the message.
|
||||||
if not encrypt:
|
if not encrypt:
|
||||||
content = ""
|
|
||||||
try:
|
|
||||||
content = await request.json()
|
|
||||||
except (JSONDecodeError, ContentTypeError):
|
|
||||||
return self._not_json
|
|
||||||
|
|
||||||
content_msgtype = content["msgtype"]
|
content_msgtype = content["msgtype"]
|
||||||
if content_msgtype in ["m.image", "m.video", "m.audio", "m.file"] or msgtype == "m.room.avatar":
|
if content_msgtype in ["m.image", "m.video", "m.audio", "m.file"] or msgtype == "m.room.avatar":
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user