Merge pull request #512 from NapNeko/refactor/packet-2
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s

refactor: packet
This commit is contained in:
pk5ls20 authored and GitHub committed 2024-11-13 17:51:00 +08:00
commit 92d720cd57
109 files changed
+2411 -1981

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
import { PacketMsg } from "@/core/packet/message/message";
import * as crypto from "node:crypto";
import { PacketMsg } from "@/core/packet/message/message";
interface ForwardMsgJson {
app: string
+3 -2
View File
@@ -148,6 +148,7 @@ export class LogWrapper {
} else if (this.consoleLogEnabled) {
this.logger.log(level, message);
} else if (this.fileLogEnabled) {
// eslint-disable-next-line no-control-regex
this.logger.log(level, message.replace(/\x1B[@-_][0-?]*[ -/]*[@-~]/g, ''));
}
}
@@ -226,7 +227,7 @@ export function rawMessageToText(msg: RawMessage, recursiveLevel = 0): string {
?
rawMessageToText(recordMsgOrNull, recursiveLevel + 1) :
`未找到消息记录 (MsgId = ${element.replyElement.sourceMsgIdInRecords})`
}]`;
}]`;
}
if (element.picElement) {
@@ -277,4 +278,4 @@ export function rawMessageToText(msg: RawMessage, recursiveLevel = 0): string {
}
return tokens.join(' ');
}
}