Fix that sending server notices fail if avatar is None (#13566)

Indroduced in #11846.
This commit is contained in:
Dirk Klimpel 2022-08-23 10:48:35 +02:00 committed by GitHub
parent 9385c41ba4
commit 37f329c9ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 4 deletions

View file

@ -689,7 +689,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
errcode=Codes.BAD_JSON,
)
if "avatar_url" in content:
if "avatar_url" in content and content.get("avatar_url") is not None:
if not await self.profile_handler.check_avatar_size_and_mime_type(
content["avatar_url"],
):