mastodon-glitch/app/assets/javascripts/channels/timeline.js

14 lines
277 B
JavaScript
Raw Normal View History

2016-08-18 13:49:51 +00:00
App.timeline = App.cable.subscriptions.create("TimelineChannel", {
connected: function() {
console.log('Connected');
},
disconnected: function() {
console.log('Disconnected');
},
received: function(data) {
console.log(JSON.parse(data.message));
}
});