Skip to content

Commit

Permalink
refactor: auto_escape of send msg
Browse files Browse the repository at this point in the history
  • Loading branch information
linyuchen committed Apr 16, 2024
1 parent 58747d7 commit d890b78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/onebot11/action/msg/SendMsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/onebot11/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d890b78

Please sign in to comment.