@satorijs/adapter-lark 3.12.5 → 3.12.6

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
@@ -949,9 +949,9 @@ var LarkMessageEncoder = class extends import_core4.MessageEncoder {
949
949
  this.quote = attrs;
950
950
  } else if (type === "img" || type === "image") {
951
951
  const image_key = await this.createImage(attrs.src || attrs.url);
952
- this.textContent += `![${attrs.alt ?? "图片"}](${image_key})`;
953
952
  this.flushText();
954
953
  this.richContent.push([{ tag: "img", image_key }]);
954
+ this.elements.push({ tag: "markdown", content: `![${attrs.alt ?? "图片"}](${image_key})` });
955
955
  } else if (["video", "audio", "file"].includes(type)) {
956
956
  await this.flush();
957
957
  await this.sendFile(type, attrs);
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.12.5",
4
+ "version": "3.12.6",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
7
7
  "types": "lib/index.d.ts",
package/src/message.ts CHANGED
@@ -224,9 +224,9 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
224
224
  this.quote = attrs
225
225
  } else if (type === 'img' || type === 'image') {
226
226
  const image_key = await this.createImage(attrs.src || attrs.url)
227
- this.textContent += `![${attrs.alt ?? '图片'}](${image_key})`
228
227
  this.flushText()
229
228
  this.richContent.push([{ tag: 'img', image_key }])
229
+ this.elements.push({ tag: 'markdown', content: `![${attrs.alt ?? '图片'}](${image_key})` })
230
230
  } else if (['video', 'audio', 'file'].includes(type)) {
231
231
  await this.flush()
232
232
  await this.sendFile(type as any, attrs)