about summary refs log tree commit diff
path: root/app/assets/javascripts/components/containers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-07 14:37:12 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-07 14:39:08 +0100
commit02e91a96ddded6f6d2505f80b45705fcfb77ed74 (patch)
treedfdd4be3ce21869fa6611e41f763b6fab3ca7a95 /app/assets/javascripts/components/containers
parent9d5fb49cd80ee31f83bf5364338bd829e3eae1d6 (diff)
Make streaming API use one pattern-matching redis pubsub connection
Refresh timelines when streaming API reconnects in the UI
Diffstat (limited to 'app/assets/javascripts/components/containers')
-rw-r--r--app/assets/javascripts/components/containers/mastodon.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx
index 3b36ce3ef..e23c65121 100644
--- a/app/assets/javascripts/components/containers/mastodon.jsx
+++ b/app/assets/javascripts/components/containers/mastodon.jsx
@@ -6,7 +6,7 @@ import {
   deleteFromTimelines,
   refreshTimeline
 } from '../actions/timelines';
-import { updateNotifications } from '../actions/notifications';
+import { updateNotifications, refreshNotifications } from '../actions/notifications';
 import createBrowserHistory from 'history/lib/createBrowserHistory';
 import {
   applyRouterMiddleware,
@@ -80,6 +80,11 @@ const Mastodon = React.createClass({
           store.dispatch(updateNotifications(JSON.parse(data.payload), getMessagesForLocale(locale), locale));
           break;
         }
+      },
+
+      reconnected () {
+        store.dispatch(refreshTimeline('home'));
+        store.dispatch(refreshNotifications());
       }
 
     });