From cc5f3f13c3b4eab8c231f6388448bce6ee7c8fd4 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Mon, 4 Apr 2022 20:13:20 -0400 Subject: [PATCH] Fix uploading portal avatars --- matrix_appservice_kakaotalk/puppet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix_appservice_kakaotalk/puppet.py b/matrix_appservice_kakaotalk/puppet.py index 48f0c68..8a525eb 100644 --- a/matrix_appservice_kakaotalk/puppet.py +++ b/matrix_appservice_kakaotalk/puppet.py @@ -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: