about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-02 16:35:06 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-02 16:35:06 +0100
commitaa2fa227e9cdd5aa4f8facd93775f6180e44a17b (patch)
tree2e7cb7e016c764c820b77bab6f5eb824cef21847 /streaming
parent61ce15d94b7e83fee902290e9466413be218ff87 (diff)
Adding documentation for streaming API. Fixing filtering bug
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/streaming/index.js b/streaming/index.js
index fd57c4e56..af1da8ae7 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -90,7 +90,9 @@ const streamFrom = (id, req, res, needsFiltering = false) => {
   redisClient.on('message', (channel, message) => {
     const { event, payload } = JSON.parse(message)
 
-    if (needsFiltering) {
+    // Only messages that may require filtering are statuses, since notifications
+    // are already personalized and deletes do not matter
+    if (needsFiltering && event === 'update') {
       pgPool.connect((err, client, done) => {
         if (err) {
           log.error(err)