2019-01-27 06:55:02 +01: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 18:43:22 +02:00
|
|
|
this.subscriber.on(`adminStream:${this.user!.id}`, data => {
|
2019-01-27 06:55:02 +01:00
|
|
|
this.send(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|