mirror of https://gitlab.com/litecord/litecord.git
gateway.websocket: properly handle status being none
This commit is contained in:
parent
3751e895ea
commit
1d86a87a5f
|
|
@ -409,14 +409,14 @@ class GatewayWebsocket:
|
||||||
'since': 0,
|
'since': 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status = {**(status or {}), **default_status}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
status = validate(status, GW_STATUS_UPDATE)
|
status = validate(status, GW_STATUS_UPDATE)
|
||||||
except BadRequest as err:
|
except BadRequest as err:
|
||||||
log.warning(f'Invalid status update: {err}')
|
log.warning(f'Invalid status update: {err}')
|
||||||
return
|
return
|
||||||
|
|
||||||
status = {**status, **default_status}
|
|
||||||
|
|
||||||
# try to extract game from activities
|
# try to extract game from activities
|
||||||
# when game not provided
|
# when game not provided
|
||||||
if not status.get('game'):
|
if not status.get('game'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue