Fix Telegram->Matrix file transfer broken in b2e183e363

This commit is contained in:
Tulir Asokan
2018-12-20 00:32:15 +02:00
parent 85eca1a75e
commit 5c4db8df5b
3 changed files with 9 additions and 12 deletions
+2 -2
View File
@@ -369,8 +369,8 @@ class Puppet:
async def update_avatar(self, source: 'AbstractUser', photo: FileLocation) -> bool:
photo_id = f"{photo.volume_id}-{photo.local_id}"
if self.photo_id != photo_id:
file = await util.transfer_file_to_matrix(self.db, source.client,
self.default_mxid_intent, photo)
file = await util.transfer_file_to_matrix(source.client, self.default_mxid_intent,
photo)
if file:
await self.default_mxid_intent.set_avatar(file.mxc)
self.photo_id = photo_id