about summary refs log tree commit diff
path: root/app/assets/javascripts/components/containers/mastodon.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/containers/mastodon.jsx')
-rw-r--r--app/assets/javascripts/components/containers/mastodon.jsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx
index 5f691b4bc..220ddc54d 100644
--- a/app/assets/javascripts/components/containers/mastodon.jsx
+++ b/app/assets/javascripts/components/containers/mastodon.jsx
@@ -40,11 +40,15 @@ const Mastodon = React.createClass({
 
     if (typeof App !== 'undefined') {
       App.timeline = App.cable.subscriptions.create("TimelineChannel", {
-        connected: function() {},
+        connected () {
 
-        disconnected: function() {},
+        },
 
-        received: function(data) {
+        disconnected () {
+
+        },
+
+        received (data) {
           switch(data.type) {
             case 'update':
               return store.dispatch(updateTimeline(data.timeline, JSON.parse(data.message)));
@@ -53,6 +57,8 @@ const Mastodon = React.createClass({
             case 'merge':
             case 'unmerge':
               return store.dispatch(refreshTimeline('home'));
+            case 'block':
+              return store.dispatch(refreshTimeline('mentions'));
           }
         }
       });