2019-01-27 14:55:02 +09:00
|
|
|
import autobind from 'autobind-decorator';
|
2021-08-19 18:33:41 +09:00
|
|
|
import Channel from '../channel.js';
|
2019-01-27 14:55:02 +09: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-13 01:43:22 +09:00
|
|
|
this.subscriber.on(`adminStream:${this.user!.id}`, data => {
|
2019-01-27 14:55:02 +09:00
|
|
|
this.send(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|