remove mark
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 发送客服消息
|
||||
|
||||
Reference in New Issue
Block a user