mizzkey/src/web/app/common/scripts/home-stream.js

25 lines
382 B
JavaScript
Raw Normal View History

2017-06-08 18:03:54 +02:00
'use strict';
import Stream from './stream';
2017-08-28 16:47:43 +02:00
import signout from './signout';
2017-06-08 18:03:54 +02:00
/**
* Home stream connection
*/
class Connection extends Stream {
constructor(me) {
super('', {
i: me.token
});
this.on('i_updated', me.update);
2017-08-28 16:47:43 +02:00
this.on('my_token_regenerated', () => {
alert('%i18n:common.my-token-regenerated%');
signout();
});
2017-06-08 18:03:54 +02:00
}
}
export default Connection;