style: lint

This commit is contained in:
手瓜一十雪
2024-05-22 20:58:49 +08:00
parent bee26de543
commit 7840ee2207
48 changed files with 1027 additions and 1115 deletions

View File

@@ -104,7 +104,7 @@ const _handlers: {
// File service
[OB11MessageDataType.image]: async (sendMsg, context) => {
let PicEle = await SendMsgElementConstructor.pic(
const PicEle = await SendMsgElementConstructor.pic(
(await handleOb11FileLikeMessage(sendMsg, context)).path,
sendMsg.data.summary || '',
sendMsg.data.subType || 0

View File

@@ -51,16 +51,16 @@ export async function sendMsg(peer: Peer, sendElements: SendMessageElement[], de
totalSize += fs.statSync(fileElement.videoElement.filePath).size;
}
if (fileElement.elementType === ElementType.PIC) {
totalSize += fs.statSync(fileElement.picElement.sourcePath).size
totalSize += fs.statSync(fileElement.picElement.sourcePath).size;
}
}
//且 PredictTime ((totalSize / 1024 / 512) * 1000)不等于Nan
let PredictTime = totalSize / 1024 / 512 * 1000;
const PredictTime = totalSize / 1024 / 512 * 1000;
if (!Number.isNaN(PredictTime)) {
timeout += PredictTime// 5S Basic Timeout + PredictTime( For File 512kb/s )
timeout += PredictTime;// 5S Basic Timeout + PredictTime( For File 512kb/s )
}
} catch (e) {
logError("发送消息计算预计时间异常", e);
logError('发送消息计算预计时间异常', e);
}
const returnMsg = await NTQQMsgApi.sendMsg(peer, sendElements, waitComplete, timeout);
try {