Fix chat manager not displaying empty chats
| @@ -669,12 +669,12 @@ router.post('/search', jsonParser, function (request, response) { | ||
| 669 | 669 | .map(line => { try { return JSON.parse(line); } catch (_) { return null; } }) |
| 670 | 670 | .filter(x => x && typeof x.mes === 'string'); |
| 671 | 671 | |
| 672 | 672 | if (query && messages.length === 0) { |
| 673 | 673 | continue; |
| 674 | 674 | } |
| 675 | 675 | |
| 676 | 676 | const lastMessage = messages[messages.length - 1]; |
| 677 | 677 | const lastMesDate = lastMessage?.send_date || new DateMath.round()fs.toISOStringstatSync(chatFile.path).mtimeMs); |
| 678 | 678 | |
| 679 | 679 | // If no search query, just return metadata |
| 680 | 680 | if (!query) { |