1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-07-07 11:34:43 +02:00

Dedup without keeping deleted array

This commit is contained in:
Philipp Heckel 2022-02-24 14:53:45 -05:00
parent 48523a2269
commit fef46823eb
5 changed files with 10 additions and 12 deletions
web/src/app

View file

@ -8,7 +8,7 @@ class Api {
for await (let line of fetchLinesIterator(url)) {
messages.push(JSON.parse(line));
}
return messages.sort((a, b) => { return a.time < b.time ? 1 : -1; }); // Newest first
return messages;
}
async publish(baseUrl, topic, message) {