koishi-plugin-echo-cave 1.24.18 → 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.
Files changed (2) hide show
  1. package/lib/index.cjs +2 -2
  2. package/package.json +1 -1
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
  }
@@ -914,7 +914,7 @@ async function searchCave(ctx, session, userIds) {
914
914
  channelId
915
915
  });
916
916
  const matchingCaves = caves.filter(
917
- (cave) => cave.originUserId === targetUserId || cave.relatedUsers.includes(targetUserId)
917
+ (cave) => cave.relatedUsers.length === 0 ? cave.originUserId === targetUserId : cave.relatedUsers.includes(targetUserId)
918
918
  );
919
919
  if (matchingCaves.length === 0) {
920
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.18",
4
+ "version": "1.24.19",
5
5
  "main": "lib/index.cjs",
6
6
  "typings": "lib/index.d.ts",
7
7
  "type": "module",