2019-01-27 06:55:02 +01:00
|
|
|
import autobind from 'autobind-decorator';
|
2021-08-19 14:55:45 +02:00
|
|
|
import Channel from '../channel';
|
2019-01-27 06:55:02 +01:00
|
|
|
|
|
|
|
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);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|