Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Commit

Permalink
stickers are now send correctly to tg
Browse files Browse the repository at this point in the history
  • Loading branch information
Redlinkk committed May 31, 2018
1 parent e08a6da commit 52e23b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions telematrix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,10 @@ async def matrix_transaction(request):
url = urlparse(content['url'])
await download_matrix_file(url, content['body'])

with open('/tmp/{}'.format(content['body']), 'rb') as file:
response = await group.send_sticker(file)
png_image = Image.open('/tmp/{}'.format(content['body']))
png_image.save('/tmp/{}.webp'.format(content['body']), 'WEBP')
with open('/tmp/{}.webp'.format(content['body']), 'rb') as file:
response = await group.send_document(file)

except:
pass
Expand Down

0 comments on commit 52e23b7

Please sign in to comment.