@gloablehive/ipad-wechat-plugin 1.0.2 → 1.0.3

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.
@@ -82,6 +82,17 @@ export const ipadWeChatPlugin = createChatChannelPlugin({
82
82
  resolveAccountId: (params) => {
83
83
  return resolveAccount(params.cfg, params.accountId)?.accountId || "";
84
84
  },
85
+ listAccountIds: (cfg) => {
86
+ const section = cfg.channels?.["ipad-wechat"];
87
+ if (section?.wechatAccountId) {
88
+ return [section.wechatAccountId];
89
+ }
90
+ return ["default"];
91
+ },
92
+ defaultAccountId: (cfg) => {
93
+ const section = cfg.channels?.["ipad-wechat"];
94
+ return section?.wechatAccountId || "default";
95
+ },
85
96
  inspectAccount(cfg, accountId) {
86
97
  const section = cfg.channels?.["ipad-wechat"];
87
98
  const hasCredentials = Boolean(section?.appKey && section?.appSecret && section?.guid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gloablehive/ipad-wechat-plugin",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for iPad WeChat protocol - enables sending/receiving WeChat messages through iPad protocol",
6
6
  "main": "index.ts",
package/src/channel.ts CHANGED
@@ -118,6 +118,17 @@ export const ipadWeChatPlugin = createChatChannelPlugin<IPadWeChatResolvedAccoun
118
118
  resolveAccountId: (params: any) => {
119
119
  return resolveAccount(params.cfg, params.accountId)?.accountId || "";
120
120
  },
121
+ listAccountIds: (cfg: any) => {
122
+ const section = (cfg.channels as Record<string, any>)?.["ipad-wechat"];
123
+ if (section?.wechatAccountId) {
124
+ return [section.wechatAccountId];
125
+ }
126
+ return ["default"];
127
+ },
128
+ defaultAccountId: (cfg: any) => {
129
+ const section = (cfg.channels as Record<string, any>)?.["ipad-wechat"];
130
+ return section?.wechatAccountId || "default";
131
+ },
121
132
  inspectAccount(cfg: any, accountId: any) {
122
133
  const section = (cfg.channels as Record<string, any>)?.["ipad-wechat"];
123
134
  const hasCredentials = Boolean(section?.appKey && section?.appSecret && section?.guid);