parent
24d1258265
commit
ee6baaa579
1 changed files with 5 additions and 2 deletions
|
@ -155,8 +155,11 @@ def new_sticker(event, user):
|
|||
value = {'type': "photo", 'version': "1.0"}
|
||||
value['url'] = app.config['MATRIX_URL'] + '/_matrix/media/r0/download/' + event['content']['url'][6:]
|
||||
value['title'] = event['content']['body']
|
||||
value['width'] = event['content']['info']['thumbnail_info']['w']
|
||||
value['height'] = event['content']['info']['thumbnail_info']['h']
|
||||
if 'h' in event['content']['info'] and 'w' in event['content']['info']:
|
||||
value['height'] = event['content']['info']['h']
|
||||
value['width'] = event['content']['info']['h']
|
||||
else:
|
||||
return
|
||||
raw = {'type': "io.pnut.core.oembed", 'value': value}
|
||||
embed = [raw]
|
||||
text = prefix + text
|
||||
|
|
Loading…
Reference in a new issue