remove mark

This commit is contained in:
2025-12-04 10:31:37 +08:00
parent 46aa293cce
commit 2a55f2d3ef
35 changed files with 1837 additions and 726 deletions

View File

@@ -1,6 +1,8 @@
import { getAccessToken } from './get-access-token.ts';
import { Redis } from 'ioredis';
import { WxCustomServiceMsg, WxMsgText } from './type/custom-service.ts';
import { Queue } from 'bullmq';
import { useContextKey } from "@kevisual/context";
export * from './type/custom-service.ts';
export * from './type/send.ts';
@@ -46,18 +48,14 @@ export class Wx {
console.log('Analyzed message:', { touser, msgType });
return;
}
const txtMsg = msg as WxMsgText;
const content = txtMsg.content;
console.log('Analyzing user message:', { touser, msgType, content });
const sendData = {
touser,
msgtype: 'text',
text: {
content: 'Hello World',
},
const wxmsgQueue = useContextKey<Queue>('wxmsgQueue');
if (!wxmsgQueue) {
throw new Error('wxmsgQueue is not available in context.');
}
this.sendUserMessage(sendData);
wxmsgQueue.add('analyzeUserMsg', {
touser,
msg,
});
}
/**
* 发送客服消息