blob: 867fd3670b9e27398a47346b80fa84043868dc92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import autobind from 'autobind-decorator';
import Channel from '../channel';
export default class extends Channel {
public readonly chName = 'apLog';
public static shouldShare = true;
public static requireCredential = false;
@autobind
public async init(params: any) {
// Subscribe events
this.subscriber.on('apLog', this.onLog);
}
@autobind
private async onLog(log: any) {
this.send('log', log);
}
@autobind
public dispose() {
// Unsubscribe events
this.subscriber.off('apLog', this.onLog);
}
}
|