Use self UID and add OIDB timeout
fetchPrivateFileUrl now uses the current account UID (resolveSelfUid) as receiverUid instead of resolving the peer UID, matching Lagrange.Core/NapCat behavior and avoiding NTQQ fulllink handler timeouts. The userId parameter is intentionally unused. runOidb gained an optional timeoutMs argument and the private-file request uses a 5000ms timeout; bridge.sendRawPacket is forwarded this timeout.
This commit is contained in:
1 parent
2de1ff4f0d
commit
4b217eb4b8
2 files changed
+11
-4
No files matched your search
@@ -84,8 +84,9 @@ export async function runOidb(
|
||||
bridge: Bridge,
|
||||
cmd: string,
|
||||
envelopeBytes: Uint8Array,
|
||||
timeoutMs?: number,
|
||||
): Promise<Uint8Array> {
|
||||
const result = await bridge.sendRawPacket(cmd, envelopeBytes);
|
||||
const result = await bridge.sendRawPacket(cmd, envelopeBytes, timeoutMs);
|
||||
if (!result.success) throw new Error(result.errorMessage || 'packet send failed');
|
||||
if (!result.gotResponse) throw new Error(result.errorMessage || 'no response');
|
||||
|
||||
|
||||
Reference in new issue
Block a user