Browse Source

Don't crash if payload is undefined.

undefined
multiple creatures 4 months ago
parent
commit
698d77fdde
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      streaming/index.js

+ 5
- 0
streaming/index.js 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`);

Loading…
Cancel
Save