koishi-plugin-forward-hime 1.4.1-alpha.2 → 1.4.2-alpha.0
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.js +5 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -340,8 +340,11 @@ function createRelayElement(kind, mime, buffer, filename) {
|
|
|
340
340
|
if (kind === "img") {
|
|
341
341
|
return import_koishi5.h.image(buffer, mime);
|
|
342
342
|
}
|
|
343
|
+
if (kind === "file") {
|
|
344
|
+
return helperMap.file(buffer, mime, { filename });
|
|
345
|
+
}
|
|
343
346
|
if (helperMap[kind]) {
|
|
344
|
-
return helperMap[kind](buffer, mime
|
|
347
|
+
return helperMap[kind](buffer, mime);
|
|
345
348
|
}
|
|
346
349
|
const base64 = buffer.toString("base64");
|
|
347
350
|
return (0, import_koishi5.h)(kind, { src: `data:${mime};base64,${base64}`, filename });
|
|
@@ -814,7 +817,7 @@ function apply(ctx2, cfg) {
|
|
|
814
817
|
});
|
|
815
818
|
});
|
|
816
819
|
ctx2.on("message-updated", async (session) => {
|
|
817
|
-
logger.debug("[message-updated]", session.messageId
|
|
820
|
+
logger.debug("[message-updated]", session.messageId);
|
|
818
821
|
});
|
|
819
822
|
}
|
|
820
823
|
// Annotate the CommonJS export names for ESM import in node:
|