mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
refactor: AdapterConfig
This commit is contained in:
@@ -4,6 +4,7 @@ import { ActionName } from '../types';
|
||||
import { ChatType, Peer } from '@/core/entities';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import { MessageUnique } from '@/common/message-unique';
|
||||
import { AdapterConfigWrap } from '@/onebot/config/config';
|
||||
|
||||
interface Response {
|
||||
messages: OB11Message[];
|
||||
@@ -43,7 +44,7 @@ export default class GoCQHTTPGetGroupMsgHistory extends BaseAction<Payload, Resp
|
||||
await Promise.all(msgList.map(async msg => {
|
||||
msg.id = MessageUnique.createUniqueMsgId({ guildId: '', chatType: msg.chatType, peerUid: msg.peerUid }, msg.msgId);
|
||||
}));
|
||||
const network = Object.values(this.obContext.configLoader.configData.network) as Array<typeof this.obContext.configLoader.configData.network[keyof typeof this.obContext.configLoader.configData.network]>;
|
||||
const network = Object.values(this.obContext.configLoader.configData.network) as Array<AdapterConfigWrap>;
|
||||
//烘焙消息
|
||||
const msgFormat = network.flat().find(e => e.name === adapter)?.messagePostFormat ?? 'array';
|
||||
const ob11MsgList = (await Promise.all(
|
||||
|
||||
Reference in New Issue
Block a user