mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-08 08:44:27 +00:00
14 lines
277 B
JavaScript
14 lines
277 B
JavaScript
|
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));
|
||
|
}
|
||
|
});
|