@aka_openclaw_plugin/mychat 0.2.3 → 0.2.4
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.
package/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as tryGetMychatRuntime, i as setMychatRuntime, n as init_runtime, t as getMychatRuntime } from "./runtime-CkiGSF1r.js";
|
|
2
|
-
import { t as mychatPlugin } from "./channel-
|
|
2
|
+
import { t as mychatPlugin } from "./channel-BV8RZeLR.js";
|
|
3
3
|
//#region extensions/mychat/api.ts
|
|
4
4
|
init_runtime();
|
|
5
5
|
//#endregion
|
|
@@ -314,8 +314,7 @@ function extractMentionUserIds(message) {
|
|
|
314
314
|
/** Check if the bot is mentioned in a message. */
|
|
315
315
|
function isBotMentioned(message, botUserId) {
|
|
316
316
|
if (!botUserId) return false;
|
|
317
|
-
|
|
318
|
-
return (message.body?.text ?? "").includes(`@${botUserId}`);
|
|
317
|
+
return extractMentionUserIds(message).includes(botUserId);
|
|
319
318
|
}
|
|
320
319
|
//#endregion
|
|
321
320
|
//#region extensions/mychat/src/monitor/message-handler.preflight.ts
|
|
@@ -426,6 +425,7 @@ function createMychatMessageHandler(params) {
|
|
|
426
425
|
const prefix = mychatLogPrefix("handler");
|
|
427
426
|
return { async handleMessage(message) {
|
|
428
427
|
logger?.debug(`${prefix} received messageId=${message.id} type=${message.type} from=${message.from?.id} to=${message.to?.id}:${message.to?.kind} text=${(message.body?.text ?? "").slice(0, 80)}`);
|
|
428
|
+
logger?.debug(`${prefix} preflight check for messageId=${message.id}, body: ${JSON.stringify(message.body)}`);
|
|
429
429
|
if (dedupe.isDuplicate(message.id)) {
|
|
430
430
|
logger?.debug(`${prefix} duplicate messageId=${message.id}, skipping`);
|
|
431
431
|
return;
|
|
@@ -662,7 +662,8 @@ function registerMychatMonitorListeners(params) {
|
|
|
662
662
|
typingListener.handle(message);
|
|
663
663
|
break;
|
|
664
664
|
case "ack":
|
|
665
|
-
logger?.
|
|
665
|
+
logger?.debug(`${prefix} ack raw body=${JSON.stringify(message.body)}`);
|
|
666
|
+
logger?.info(`${prefix} ack conversationId=${message.body?.conversationId} status=${message.body?.status} cursor=${message.body?.currentCursor}`);
|
|
666
667
|
break;
|
|
667
668
|
default:
|
|
668
669
|
logger?.debug(`${prefix} unhandled type=${message.type} id=${message.id}`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as mychatPlugin } from "./channel-
|
|
1
|
+
import { t as mychatPlugin } from "./channel-BV8RZeLR.js";
|
|
2
2
|
export { mychatPlugin };
|