Slightly more resilient against crashing due to events I don't know how to handle
This commit is contained in:
parent
f84360398e
commit
86dc07d64b
|
@ -108,15 +108,15 @@ async def listen(c, me):
|
||||||
# two events come in for the statuses, one of them has the status nested deeper
|
# two events come in for the statuses, one of them has the status nested deeper
|
||||||
# just ignore that one
|
# just ignore that one
|
||||||
if 'status' in status: continue
|
if 'status' in status: continue
|
||||||
|
|
||||||
|
status_id = status['id']
|
||||||
|
status_author = '@' + status['account']['acct']
|
||||||
|
status_text = status['content']
|
||||||
|
status_visibility = status['visibility']
|
||||||
except:
|
except:
|
||||||
# ignore any events we don't know how to handle
|
# ignore any events we don't know how to handle
|
||||||
continue
|
continue
|
||||||
|
|
||||||
status_id = status['id']
|
|
||||||
status_author = '@' + status['account']['acct']
|
|
||||||
status_text = status['content']
|
|
||||||
status_visibility = status['visibility']
|
|
||||||
|
|
||||||
reply_visibility = min(('unlisted', status_visibility), key=['direct', 'private', 'unlisted', 'public'].index)
|
reply_visibility = min(('unlisted', status_visibility), key=['direct', 'private', 'unlisted', 'public'].index)
|
||||||
|
|
||||||
media_ids = None
|
media_ids = None
|
||||||
|
|
Loading…
Reference in New Issue