null-ify text after trimming

this comes from upstream, it's already present in the "import"
section, I think it was missed in a merge
This commit is contained in:
dakkar 2024-01-26 18:07:49 +00:00
parent 83e9057b27
commit b0fcc11d9e

View file

@ -328,6 +328,9 @@ export class NoteCreateService implements OnApplicationShutdown {
data.text = data.text.slice(0, DB_MAX_NOTE_TEXT_LENGTH);
}
data.text = data.text.trim();
if (data.text === '') {
data.text = null;
}
} else {
data.text = null;
}