2018-10-07 05:06:17 +03:00
|
|
|
import autobind from 'autobind-decorator';
|
2021-08-19 15:55:45 +03:00
|
|
|
import Channel from '../channel';
|
2018-10-07 05:06:17 +03:00
|
|
|
|
|
|
|
export default class extends Channel {
|
2018-10-11 17:01:57 +03:00
|
|
|
public readonly chName = 'drive';
|
2018-10-11 17:07:20 +03:00
|
|
|
public static shouldShare = true;
|
2018-11-10 19:22:34 +02:00
|
|
|
public static requireCredential = true;
|
2018-10-11 17:01:57 +03:00
|
|
|
|
2018-10-07 05:06:17 +03:00
|
|
|
@autobind
|
|
|
|
public async init(params: any) {
|
|
|
|
// Subscribe drive stream
|
2019-04-12 19:43:22 +03:00
|
|
|
this.subscriber.on(`driveStream:${this.user!.id}`, data => {
|
2018-10-07 05:06:17 +03:00
|
|
|
this.send(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|