attempt to handle lack of image info in event #32
This commit is contained in:
parent
fe4d59811c
commit
632b69f75b
1 changed files with 20 additions and 19 deletions
|
@ -65,6 +65,7 @@ def on_receive_events(transaction):
|
||||||
value = {"type": "photo", "version": "1.0"}
|
value = {"type": "photo", "version": "1.0"}
|
||||||
value["title"] = event['content']['body']
|
value["title"] = event['content']['body']
|
||||||
value["url"] = imgurl
|
value["url"] = imgurl
|
||||||
|
if 'info' in event['content']:
|
||||||
if 'w' in event['content']['info']:
|
if 'w' in event['content']['info']:
|
||||||
value["width"] = event['content']['info']['w']
|
value["width"] = event['content']['info']['w']
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue