ignore incomplete thumbnail info
This commit is contained in:
parent
25ac47d049
commit
b65b040a15
1 changed files with 10 additions and 9 deletions
|
@ -258,6 +258,7 @@ def raw_from_event(event):
|
|||
else:
|
||||
value['height'] = 200
|
||||
if 'thumbnail_info' in event['content']['info']:
|
||||
if 'thumbnail_url' in event['content']['info']:
|
||||
value['thumbnail_url'] = app.config['MATRIX_URL'] + '/_matrix/media/r0/download/' + event['content']['info']['thumbnail_url'][6:]
|
||||
if 'w' in event['content']['info']['thumbnail_info']:
|
||||
value['thumbnail_width'] = event['content']['info']['thumbnail_info']['w']
|
||||
|
|
Loading…
Reference in a new issue