Feat/Implement QQ Online File/Folder and Flash Transfer support (#1541)
* feat: implement QQ online file transfer and flash transfer support * fix: change OnlineFile OB11Message data * fix: add fileSize and isDir to OB11MessageOnlineFile * fix: resolve typescript strict mode errors
This commit is contained in:
1 parent
e25dd38acd
commit
b0114206fc
35 files changed
+1831
-23
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import { OB11BaseNoticeEvent } from './OB11BaseNoticeEvent';
|
||||
import { NapCatCore } from 'napcat-core';
|
||||
|
||||
export abstract class OB11OnlineFileNoticeEvent extends OB11BaseNoticeEvent {
|
||||
peer_id: number;
|
||||
|
||||
protected constructor (core: NapCatCore, peer_id: number) {
|
||||
super(core);
|
||||
this.peer_id = peer_id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { OB11OnlineFileNoticeEvent } from './OB11OnlineFileNoticeEvent';
|
||||
import { NapCatCore } from '@/napcat-core';
|
||||
|
||||
export class OB11OnlineFileReceiveEvent extends OB11OnlineFileNoticeEvent {
|
||||
notice_type: string;
|
||||
sub_type: string;
|
||||
|
||||
constructor (core: NapCatCore, peer_id: number) {
|
||||
super(core, peer_id);
|
||||
this.notice_type = 'online_file_receive';
|
||||
this.sub_type = 'cancel';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { OB11OnlineFileNoticeEvent } from './OB11OnlineFileNoticeEvent';
|
||||
import { NapCatCore } from '@/napcat-core';
|
||||
|
||||
export class OB11OnlineFileSendEvent extends OB11OnlineFileNoticeEvent {
|
||||
notice_type = 'online_file_send';
|
||||
sub_type: 'receive' | 'refuse';
|
||||
|
||||
constructor (core: NapCatCore, peer_id: number, sub_type: 'receive' | 'refuse') {
|
||||
super(core, peer_id);
|
||||
this.sub_type = sub_type;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user