diff --git a/packages/engine-chronocat-api/src/services/msgBoxActiv.ts b/packages/engine-chronocat-api/src/services/msgBoxActiv.ts index 37f085d..0f21076 100644 --- a/packages/engine-chronocat-api/src/services/msgBoxActiv.ts +++ b/packages/engine-chronocat-api/src/services/msgBoxActiv.ts @@ -15,7 +15,10 @@ export const msgBoxActiv = (ctx: ChronocatContext): MsgBoxActiv => { void ctx.chronocat .whenReady() .then(() => ctx.chronocat.sleep(4000)) - .then(() => { + .then(() => ctx.chronocat.getConfig()) + .then((config) => { + if (!config.receive_msgbox) return + let task = fetchAndSubscribeABatchOfRecentContact({ fetchParam: { anchorPointContact: { diff --git a/packages/shell/src/services/config/configEntity.ts b/packages/shell/src/services/config/configEntity.ts index 0547094..7e55a00 100644 --- a/packages/shell/src/services/config/configEntity.ts +++ b/packages/shell/src/services/config/configEntity.ts @@ -16,6 +16,17 @@ export interface ChronocatBaseConfig { * @default [] */ servers?: (ChronocatSatoriServerConfig | ChronocatSatoriWebHookConfig)[] + + /** + * @title 接收群助手消息 + * + * @description 是否接收群助手内群的消息。启用时,Chronocat + * 会在应用启动后主动向 QQ + * 申请推送群助手内所有群的消息。默认启用,关闭则默认不推送群助手内群的新消息。 + * + * @default true + */ + receive_msgbox?: boolean } export interface ChronocatConfig extends ChronocatBaseConfig {