server: Fix fulltext search ignoring buffers

pull/294/head
Elian Doran 2024-08-04 23:26:35 +07:00
parent 8f5859f344
commit f3641e5fa6
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

@ -86,7 +86,7 @@ class NoteContentFulltextExp extends Expression {
}
}
if (!content || typeof content !== "string") {
if (!content) {
return;
}
@ -123,7 +123,7 @@ class NoteContentFulltextExp extends Expression {
return content;
}
preprocessContent(content: string, type: string, mime: string) {
preprocessContent(content: string | Buffer, type: string, mime: string) {
content = utils.normalize(content.toString());
if (type === 'text' && mime === 'text/html') {