Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Fix uploading portal avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Apr 4, 2022
1 parent 14a7e65 commit f728716
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mautrix_facebook/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@ async def _update_name(self, info: Participant) -> bool:
return True
return False

@classmethod
async def reupload_avatar(
self,
cls,
source: u.User | None,
intent: IntentAPI,
url: str,
Expand All @@ -217,7 +218,7 @@ async def reupload_avatar(
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: Picture) -> bool:
Expand Down

0 comments on commit f728716

Please sign in to comment.