mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 09:43:08 +02:00
16 lines
287 B
TypeScript
16 lines
287 B
TypeScript
export default function(note) {
|
|
if (note.text == null) return true;
|
|
|
|
let txt = note.text;
|
|
|
|
if (note.media) {
|
|
note.media.forEach(file => {
|
|
txt = txt.replace(file.url, '');
|
|
if (file.src) txt = txt.replace(file.src, '');
|
|
});
|
|
|
|
if (txt == '') return true;
|
|
}
|
|
|
|
return false;
|
|
}
|