@satorijs/adapter-lark 3.10.3 → 3.10.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/lib/index.cjs CHANGED
@@ -147,8 +147,10 @@ async function adaptSession(bot, body) {
147
147
  }, "setOption");
148
148
  for (const [key, value] of Object.entries(body.event.action.form_value ?? {})) {
149
149
  if (key.startsWith("@@")) {
150
- if (value) args.push(key.slice(2));
150
+ if (value === false) continue;
151
+ args.push(key.slice(2));
151
152
  } else if (key.startsWith("@")) {
153
+ if (value === false) continue;
152
154
  const [_key] = key.slice(1).split("=", 1);
153
155
  setOption(_key, key.slice(2 + _key.length));
154
156
  } else if (+key * 0 === 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@satorijs/adapter-lark",
3
3
  "description": "Lark (飞书) Adapter for Satorijs",
4
- "version": "3.10.3",
4
+ "version": "3.10.4",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
7
7
  "types": "lib/index.d.ts",
package/src/utils.ts CHANGED
@@ -267,8 +267,10 @@ export async function adaptSession<C extends Context>(bot: LarkBot<C>, body: Eve
267
267
  }
268
268
  for (const [key, value] of Object.entries(body.event.action.form_value ?? {})) {
269
269
  if (key.startsWith('@@')) {
270
- if (value) args.push(key.slice(2))
270
+ if (value === false) continue
271
+ args.push(key.slice(2))
271
272
  } else if (key.startsWith('@')) {
273
+ if (value === false) continue
272
274
  const [_key] = key.slice(1).split('=', 1)
273
275
  setOption(_key, key.slice(2 + _key.length))
274
276
  } else if (+key * 0 === 0) {