koishi-plugin-best-cave 1.5.10 → 1.5.11

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1271,7 +1271,10 @@ async function buildMessage(cave, resourceDir, session) {
1271
1271
  lines.push(element.content);
1272
1272
  } else if (element.type === "img" && element.file) {
1273
1273
  const filePath = path5.join(resourceDir, element.file);
1274
- lines.push(import_koishi5.h.image(filePath));
1274
+ const base64Data = await processMediaFile(filePath, "image");
1275
+ if (base64Data) {
1276
+ lines.push((0, import_koishi5.h)("image", { src: base64Data }));
1277
+ }
1275
1278
  }
1276
1279
  }
1277
1280
  lines.push(session.text("commands.cave.message.contributorSuffix", [cave.contributor_name]));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-best-cave",
3
3
  "description": "最好的 cave 插件,可开关的审核系统,可引用添加,支持图文混合内容,可查阅投稿列表,完美复刻你的 .cave 体验!",
4
- "version": "1.5.10",
4
+ "version": "1.5.11",
5
5
  "contributors": [
6
6
  "Yis_Rime <yis_rime@outlook.com>"
7
7
  ],