logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 909a6d4661fbc79419e396076467aec6251b7af4
parent: 3f3de3807552794b2b509d75c522a1713d80c3be
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sun, 24 Sep 2017 15:31:03 +0200

Fix streaming API double-JSON-encoding status IDs for deletes (#5069)


Diffstat:

Mstreaming/index.js2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streaming/index.js b/streaming/index.js @@ -264,7 +264,7 @@ const startWorker = (workerId) => { const transmit = () => { const now = new Date().getTime(); const delta = now - queued_at; - const encodedPayload = typeof payload === 'number' ? payload : JSON.stringify(payload); + const encodedPayload = typeof payload === 'object' ? JSON.stringify(payload) : payload; log.silly(req.requestId, `Transmitting for ${req.accountId}: ${event} ${encodedPayload} Delay: ${delta}ms`); output(event, encodedPayload);