2018-10-07 02:06:17 +00:00
|
|
|
import autobind from 'autobind-decorator';
|
|
|
|
import Channel from '../channel';
|
|
|
|
|
|
|
|
export default class extends Channel {
|
2018-10-11 14:01:57 +00:00
|
|
|
public readonly chName = 'messagingIndex';
|
|
|
|
public readonly shouldShare = true;
|
|
|
|
|
2018-10-07 02:06:17 +00:00
|
|
|
@autobind
|
|
|
|
public async init(params: any) {
|
|
|
|
// Subscribe messaging index stream
|
|
|
|
this.subscriber.on(`messagingIndexStream:${this.user._id}`, data => {
|
|
|
|
this.send(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|