mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
refactor: send rate
This commit is contained in:
parent
70124d5177
commit
1e0820d613
@ -118,7 +118,10 @@ const _handlers: {
|
||||
[OB11MessageDataType.file]: async (sendMsg, context) => {
|
||||
const { path, fileName } = await handleOb11FileLikeMessage(sendMsg, context);
|
||||
//logDebug('发送文件', path, fileName);
|
||||
return SendMsgElementConstructor.file(path, fileName);
|
||||
const FileEle = await SendMsgElementConstructor.file(path, fileName);
|
||||
// 清除Upload的应该
|
||||
// context.deleteAfterSentFiles.push(fileName || FileEle.fileElement.filePath);
|
||||
return FileEle;
|
||||
},
|
||||
|
||||
[OB11MessageDataType.video]: async (sendMsg, context) => {
|
||||
|
@ -55,7 +55,7 @@ export async function sendMsg(peer: Peer, sendElements: SendMessageElement[], de
|
||||
}
|
||||
}
|
||||
//且 PredictTime ((totalSize / 1024 / 512) * 1000)不等于Nan
|
||||
const PredictTime = totalSize / 1024 / 512 * 1000;
|
||||
const PredictTime = totalSize / 1024 / 256 * 1000;
|
||||
if (!Number.isNaN(PredictTime)) {
|
||||
timeout += PredictTime;// 5S Basic Timeout + PredictTime( For File 512kb/s )
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user