@wu529778790/open-im 1.9.1-beta.0 → 1.9.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,13 +20,14 @@ export function setupWorkBuddyHandlers(config, sessionManager) {
|
|
|
20
20
|
const runningTasks = new Map();
|
|
21
21
|
const taskKeyByChatId = new Map();
|
|
22
22
|
const stopTaskCleanup = startTaskCleanup(runningTasks);
|
|
23
|
+
let currentMsgId = '';
|
|
23
24
|
const commandHandler = new CommandHandler({
|
|
24
25
|
config,
|
|
25
26
|
sessionManager,
|
|
26
27
|
requestQueue,
|
|
27
28
|
sender: {
|
|
28
29
|
sendTextReply: async (chatId, text) => {
|
|
29
|
-
|
|
30
|
+
await sendTextReply(null, chatId, text, currentMsgId);
|
|
30
31
|
},
|
|
31
32
|
},
|
|
32
33
|
getRunningTasksSize: () => runningTasks.size,
|
|
@@ -71,6 +72,7 @@ export function setupWorkBuddyHandlers(config, sessionManager) {
|
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
async function handleEvent(chatId, msgId, content) {
|
|
75
|
+
currentMsgId = msgId;
|
|
74
76
|
log.info(`[handleEvent] chatId=${chatId}, msgId=${msgId}, content="${content.substring(0, 100)}"`);
|
|
75
77
|
// Use chatId as userId for WorkBuddy (WeChat KF doesn't have separate userId)
|
|
76
78
|
const userId = chatId;
|