Skip to content

Commit

Permalink
Work around bugs in some servers
Browse files Browse the repository at this point in the history
Closes #118
  • Loading branch information
tulir committed Sep 24, 2022
1 parent 9e38b9e commit fe17bad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mautrix/appservice/as_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ async def _http_handle_transaction(self, request: web.Request) -> web.Response:

@staticmethod
def _fix_prev_content(raw_event: JSON) -> None:
try:
if raw_event["unsigned"] is None:
del raw_event["unsigned"]
except KeyError:
pass
try:
raw_event["unsigned"]["prev_content"]
except KeyError:
Expand Down

0 comments on commit fe17bad

Please sign in to comment.