refactor: rename function convertMessage2List to normalize

This commit is contained in:
Wesley F. Young
2024-05-15 16:33:15 +08:00
parent 3983e7e78d
commit a3f6c6fa5e
4 changed files with 13 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ import { log, logDebug, logError } from '@/common/utils/log';
import { ob11Config } from '@/onebot11/config';
import crypto from 'crypto';
import { ChatType, Group, GroupRequestOperateTypes, Peer } from '@/core/entities';
import { convertMessage2List, createSendElements, sendMsg } from '../action/msg/SendMsg';
import { normalize, createSendElements, sendMsg } from '../action/msg/SendMsg';
import { OB11FriendRequestEvent } from '../event/request/OB11FriendRequest';
import { OB11GroupRequestEvent } from '../event/request/OB11GroupRequest';
import { isNull } from '@/common/utils/helper';
@@ -138,7 +138,7 @@ export function postOB11Event(msg: PostEventType, reportSelf = false, postWs = t
} as OB11MessageAt);
}
}
replyMessage = replyMessage.concat(convertMessage2List(reply, resJson.auto_escape));
replyMessage = replyMessage.concat(normalize(reply, resJson.auto_escape));
const { sendElements, deleteAfterSentFiles } = await createSendElements(replyMessage, group);
sendMsg(peer, sendElements, deleteAfterSentFiles, false).then();
} else if (resJson.delete) {