Fix uploading portal avatars

This commit is contained in:
Andrew Ferrazzutti 2022-04-04 20:13:20 -04:00
parent a9633118c5
commit cc5f3f13c3

View File

@ -204,8 +204,9 @@ class Puppet(DBPuppet, BasePuppet):
return True
return False
@classmethod
async def reupload_avatar(
self,
cls,
source: u.User,
intent: IntentAPI,
url: str,
@ -215,7 +216,7 @@ class Puppet(DBPuppet, BasePuppet):
data = await resp.read()
mime = magic.mimetype(data)
return await intent.upload_media(
data, mime_type=mime, async_upload=self.config["homeserver.async_media"]
data, mime_type=mime, async_upload=cls.config["homeserver.async_media"]
)
async def _update_photo(self, source: u.User, photo_id: str) -> bool: