@gloablehive/ipad-wechat-plugin 1.0.6 → 1.0.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/src/channel.js +8 -0
- package/package.json +1 -1
- package/src/channel.ts +8 -0
package/dist/src/channel.js
CHANGED
|
@@ -135,6 +135,14 @@ export const ipadWeChatPlugin = createChatChannelPlugin({
|
|
|
135
135
|
},
|
|
136
136
|
outbound: {
|
|
137
137
|
channel: "ipad-wechat",
|
|
138
|
+
// Resolve target - for WeChat, just pass through the ID
|
|
139
|
+
resolveTarget: (params) => {
|
|
140
|
+
const target = params.to?.trim();
|
|
141
|
+
if (!target) {
|
|
142
|
+
return { ok: false, error: new Error("No target specified") };
|
|
143
|
+
}
|
|
144
|
+
return { ok: true, to: target };
|
|
145
|
+
},
|
|
138
146
|
attachedResults: {
|
|
139
147
|
sendText: async (params) => {
|
|
140
148
|
// Get config from params.cfg
|
package/package.json
CHANGED
package/src/channel.ts
CHANGED
|
@@ -176,6 +176,14 @@ export const ipadWeChatPlugin = createChatChannelPlugin<IPadWeChatResolvedAccoun
|
|
|
176
176
|
|
|
177
177
|
outbound: {
|
|
178
178
|
channel: "ipad-wechat",
|
|
179
|
+
// Resolve target - for WeChat, just pass through the ID
|
|
180
|
+
resolveTarget: (params: any) => {
|
|
181
|
+
const target = params.to?.trim();
|
|
182
|
+
if (!target) {
|
|
183
|
+
return { ok: false, error: new Error("No target specified") };
|
|
184
|
+
}
|
|
185
|
+
return { ok: true, to: target };
|
|
186
|
+
},
|
|
179
187
|
attachedResults: {
|
|
180
188
|
sendText: async (params: any) => {
|
|
181
189
|
// Get config from params.cfg
|