koishi-plugin-echo-cave 1.24.17 → 1.24.19
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 +6 -2
- package/package.json +3 -3
package/lib/index.cjs
CHANGED
|
@@ -126,7 +126,7 @@ async function saveMedia(ctx, mediaElement, type, cfg) {
|
|
|
126
126
|
ctx.logger.warn(`Invalid image content-type: ${contentType}`);
|
|
127
127
|
return mediaUrl;
|
|
128
128
|
}
|
|
129
|
-
if (type === "video" && !contentType.startsWith("video/")) {
|
|
129
|
+
if (type === "video" && !contentType.startsWith("video/") && contentType !== "application/octet-stream") {
|
|
130
130
|
ctx.logger.warn(`Invalid video content-type: ${contentType}`);
|
|
131
131
|
return mediaUrl;
|
|
132
132
|
}
|
|
@@ -577,6 +577,10 @@ async function sendCaveMsg(ctx, session, caveMsg, cfg) {
|
|
|
577
577
|
const chosenTemplate2 = availableTemplates2[Math.floor(Math.random() * availableTemplates2.length)];
|
|
578
578
|
await session.onebot.sendGroupMsg(channelId, [createTextMsg(chosenTemplate2)]);
|
|
579
579
|
if (!isActualForward) {
|
|
580
|
+
if (content[0].type === "record") {
|
|
581
|
+
await session.onebot.sendGroupMsg(channelId, content);
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
580
584
|
const forwardContent = [
|
|
581
585
|
{
|
|
582
586
|
type: "node",
|
|
@@ -910,7 +914,7 @@ async function searchCave(ctx, session, userIds) {
|
|
|
910
914
|
channelId
|
|
911
915
|
});
|
|
912
916
|
const matchingCaves = caves.filter(
|
|
913
|
-
(cave) => cave.originUserId === targetUserId
|
|
917
|
+
(cave) => cave.relatedUsers.length === 0 ? cave.originUserId === targetUserId : cave.relatedUsers.includes(targetUserId)
|
|
914
918
|
);
|
|
915
919
|
if (matchingCaves.length === 0) {
|
|
916
920
|
return session.text(".noMatchingCaves", [targetUserId]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-echo-cave",
|
|
3
3
|
"description": "Group echo cave",
|
|
4
|
-
"version": "1.24.
|
|
4
|
+
"version": "1.24.19",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@types/node": "^24.10.4",
|
|
50
50
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
51
51
|
"esbuild": "^0.27.2",
|
|
52
|
-
"oxfmt": "^0.
|
|
53
|
-
"oxlint": "^1.
|
|
52
|
+
"oxfmt": "^0.20.0",
|
|
53
|
+
"oxlint": "^1.35.0",
|
|
54
54
|
"semantic-release": "^25.0.2",
|
|
55
55
|
"typescript": "^5.9.3"
|
|
56
56
|
}
|