@aka_openclaw_plugin/mychat 0.2.6 → 0.2.7

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-Bm6L1z-e.js";
2
+ import { t as mychatPlugin } from "./channel-D4lJ2Vvp.js";
3
3
  //#region extensions/mychat/api.ts
4
4
  init_runtime();
5
5
  //#endregion
@@ -777,11 +777,11 @@ async function monitorMychatProvider(ctx) {
777
777
  }
778
778
  /** Dispatch an inbound message through the OpenClaw turn runtime. */
779
779
  async function dispatchMychatInbound(ctx, httpClient, result) {
780
- const { runtime, cfg, account } = ctx;
780
+ const { runtime, channelRuntime, cfg, account } = ctx;
781
781
  const logger = ctx.log;
782
782
  const prefix = mychatLogPrefix("dispatch");
783
- const rt = runtime;
784
- if (!rt.channel?.turn?.run) {
783
+ const rt = channelRuntime ?? runtime.channel;
784
+ if (!rt?.turn?.run) {
785
785
  logger?.error(`${prefix} channel.turn.run not available on runtime, cannot dispatch inbound messageId=${result.context.messageId}`);
786
786
  return;
787
787
  }
@@ -790,7 +790,7 @@ async function dispatchMychatInbound(ctx, httpClient, result) {
790
790
  const senderId = result.context.senderId;
791
791
  const chatType = result.context.chatType;
792
792
  const messageId = result.context.messageId;
793
- await rt.channel.turn.run({
793
+ await rt.turn.run({
794
794
  channel: "mychat",
795
795
  accountId: account.accountId,
796
796
  raw: result,
@@ -804,7 +804,7 @@ async function dispatchMychatInbound(ctx, httpClient, result) {
804
804
  raw: result
805
805
  }),
806
806
  resolveTurn: (input) => {
807
- const msgCtx = rt.channel.turn.buildContext({
807
+ const msgCtx = rt.turn.buildContext({
808
808
  channel: "mychat",
809
809
  accountId: account.accountId,
810
810
  timestamp: input.timestamp,
@@ -912,6 +912,7 @@ function createMychatPluginBase() {
912
912
  const result = await monitorMychatProvider({
913
913
  cfg: ctx.cfg,
914
914
  runtime: ctx.runtime,
915
+ channelRuntime: ctx.channelRuntime,
915
916
  account: ctx.account,
916
917
  setStatus,
917
918
  abortSignal: ctx.abortSignal,
@@ -1,2 +1,2 @@
1
- import { t as mychatPlugin } from "./channel-Bm6L1z-e.js";
1
+ import { t as mychatPlugin } from "./channel-D4lJ2Vvp.js";
2
2
  export { mychatPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aka_openclaw_plugin/mychat",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "OpenClaw MyChat channel plugin",
5
5
  "repository": {
6
6
  "type": "git",