Skip to content

Commit

Permalink
修复监听模式未判断cq配置就推送的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cxOrz committed Apr 2, 2023
1 parent 3bd6eca commit 45a5eb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/server/src/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,10 @@ async function handleMsg(this: CQ, data: string) {

// 签到 & 推送消息
// 签到检测通知推送
cq.send(`${IM_Params.myName},检测到${getSignType(PPTActiveInfo)},将在${config.monitor.delay}秒后处理`, config.cqserver.target_id);
cq.setCache('params', { ...params, activeId: IM_CourseInfo.aid });
if (config.cqserver?.cq_enabled) {
cq.send(`${IM_Params.myName},检测到${getSignType(PPTActiveInfo)},将在${config.monitor.delay}秒后处理`, config.cqserver.target_id);
cq.setCache('params', { ...params, activeId: IM_CourseInfo.aid });
}

await delay(config.monitor.delay);
const result = await Sign(IM_Params.myName, params, config.monitor, {
Expand Down

0 comments on commit 45a5eb9

Please sign in to comment.