@satorijs/adapter-lark 3.10.4 → 3.10.5

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
@@ -663,6 +663,7 @@ var LarkMessageEncoder = class extends import_core3.MessageEncoder {
663
663
  content: this.textContent
664
664
  }
665
665
  });
666
+ this.textContent = "";
666
667
  } else if (attrs.type === "submit") {
667
668
  this.flushText(true);
668
669
  await this.render(children);
@@ -679,18 +680,18 @@ var LarkMessageEncoder = class extends import_core3.MessageEncoder {
679
680
  content: attrs.text
680
681
  }
681
682
  });
683
+ this.textContent = "";
682
684
  } else {
683
685
  this.flushText();
684
- await this.render(children);
685
686
  this.card?.elements.push({
686
687
  tag: "action",
687
688
  actions: [{
688
689
  tag: "input",
689
690
  name: attrs.name,
690
691
  width: attrs.width,
691
- label: this.textContent && {
692
+ label: attrs.label && {
692
693
  tag: "plain_text",
693
- content: this.textContent
694
+ content: attrs.label
694
695
  },
695
696
  placeholder: attrs.placeholder && {
696
697
  tag: "plain_text",
@@ -700,7 +701,6 @@ var LarkMessageEncoder = class extends import_core3.MessageEncoder {
700
701
  }]
701
702
  });
702
703
  }
703
- this.textContent = "";
704
704
  } else if (type === "button") {
705
705
  this.card ??= { elements: [] };
706
706
  this.flushText(true);
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.4",
4
+ "version": "3.10.5",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
7
7
  "types": "lib/index.d.ts",
package/src/message.ts CHANGED
@@ -273,6 +273,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
273
273
  content: this.textContent,
274
274
  },
275
275
  })
276
+ this.textContent = ''
276
277
  } else if (attrs.type === 'submit') {
277
278
  this.flushText(true)
278
279
  await this.render(children)
@@ -289,18 +290,18 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
289
290
  content: attrs.text,
290
291
  },
291
292
  })
293
+ this.textContent = ''
292
294
  } else {
293
295
  this.flushText()
294
- await this.render(children)
295
296
  this.card?.elements.push({
296
297
  tag: 'action',
297
298
  actions: [{
298
299
  tag: 'input',
299
300
  name: attrs.name,
300
301
  width: attrs.width,
301
- label: this.textContent && {
302
+ label: attrs.label && {
302
303
  tag: 'plain_text',
303
- content: this.textContent,
304
+ content: attrs.label,
304
305
  },
305
306
  placeholder: attrs.placeholder && {
306
307
  tag: 'plain_text',
@@ -310,7 +311,6 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
310
311
  }],
311
312
  })
312
313
  }
313
- this.textContent = ''
314
314
  } else if (type === 'button') {
315
315
  this.card ??= { elements: [] }
316
316
  this.flushText(true)