From 2423830e3c08d319317dd193b7d3ad450016fd4a Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 27 Apr 2019 19:16:29 -0500 Subject: [PATCH] Don't crash if payload is undefined. --- streaming/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/streaming/index.js b/streaming/index.js index d4fb8cad3..eccf5219f 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -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`);