refactor: auto_escape of send msg

This commit is contained in:
linyuchen 2024-04-16 23:22:37 +08:00
parent 58747d7d4a
commit d890b78290
2 changed files with 2 additions and 2 deletions

View File

@ -329,7 +329,7 @@ export class SendMsg extends BaseAction<OB11PostSendMsg, ReturnDataType> {
} else {
throw ('发送消息参数错误, 请指定group_id或user_id');
}
const messages = convertMessage2List(payload.message, payload.auto_escape);
const messages = convertMessage2List(payload.message, payload.auto_escape === true || payload.auto_escape === 'true');
if (this.getSpecialMsgNum(payload, OB11MessageDataType.node)) {
try {
const returnMsg = await this.handleForwardNode(peer, messages as OB11MessageNode[], group);

View File

@ -243,7 +243,7 @@ export interface OB11PostSendMsg {
group_id?: string,
message: OB11MessageMixType;
messages?: OB11MessageMixType; // 兼容 go-cqhttp
auto_escape?: boolean
auto_escape?: boolean | string
}
export interface OB11Version {