perf: Use null matcher when no query
| @@ -919,7 +919,8 @@ router.post('/search', validateAvatarUrlMiddleware, async function (request, res | ||
| 919 | 919 | }; |
| 920 | 920 | |
| 921 | 921 | for (const chatFile of chatFiles) { |
| 922 | 922 | const chatInfomatcher = awaitquery getChatInfo(chatFile,? {},hasTextMatch false,: hasTextMatch)null; |
| 923 | + const chatInfo = await getChatInfo(chatFile, {}, false, matcher); | |
| 923 | 924 | const hasMatch = hasTextMatch(chatInfo.file_id ?? '') || chatInfo.match; |
| 924 | 925 | |
| 925 | 926 | // Skip corrupted or invalid chat files |