mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-29 21:46:43 -06:00
25 lines
479 B
TypeScript
25 lines
479 B
TypeScript
|
import autobind from 'autobind-decorator';
|
||
|
import Channel from '../channel';
|
||
|
|
||
|
export default class extends Channel {
|
||
|
public readonly chName = 'apLog';
|
||
|
public static shouldShare = true;
|
||
|
|
||
|
@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);
|
||
|
}
|
||
|
}
|