refactor: further decoupling of Packet and Core parts

This commit is contained in:
pk5ls20
2024-10-14 17:51:21 +08:00
parent 1fbc339a42
commit 397c2cf5f0
9 changed files with 68 additions and 42 deletions

View File

@@ -377,7 +377,7 @@ export class NTQQFileApi {
online_rkey: false
};
try {
if (this.core.apis.PacketApi.packetClient?.available) {
if (this.core.apis.PacketApi.available) {
if ((!this.packetRkey || this.packetRkey[0].time > Date.now() / 1000)) {
this.packetRkey = await this.core.apis.PacketApi.sendRkeyPacket();
}