2019-01-27 05:55:02 +00:00
|
|
|
import autobind from 'autobind-decorator';
|
|
|
|
import Channel from '../channel';
|
|
|
|
|
|
|
|
export default class extends Channel {
|
|
|
|
public readonly chName = 'admin';
|
|
|
|
public static shouldShare = true;
|
|
|
|
public static requireCredential = true;
|
|
|
|
|
|
|
|
@autobind
|
|
|
|
public async init(params: any) {
|
|
|
|
// Subscribe admin stream
|
2019-04-12 16:43:22 +00:00
|
|
|
this.subscriber.on(`adminStream:${this.user!.id}`, data => {
|
2019-01-27 05:55:02 +00:00
|
|
|
this.send(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|