Don't crash if payload is undefined.

staging
multiple creatures 2019-04-27 19:16:29 -05:00
parent d339d2bbb4
commit 2423830e3c
1 changed files with 5 additions and 0 deletions

View File

@ -339,6 +339,11 @@ const startWorker = (workerId) => {
return;
}
if (payload === undefined) {
log.silly(req.requestId, `Skipped undefined ${event} payload`);
return;
}
// Only send local-only statuses to logged-in users
if (payload.local_only && !req.accountId) {
log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`);