Don't crash if payload is undefined.
parent
d339d2bbb4
commit
2423830e3c
|
@ -339,6 +339,11 @@ const startWorker = (workerId) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (payload === undefined) {
|
||||||
|
log.silly(req.requestId, `Skipped undefined ${event} payload`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Only send local-only statuses to logged-in users
|
// Only send local-only statuses to logged-in users
|
||||||
if (payload.local_only && !req.accountId) {
|
if (payload.local_only && !req.accountId) {
|
||||||
log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`);
|
log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`);
|
||||||
|
|
Loading…
Reference in New Issue