Add since=all; make poll=1 default to since=all

This commit is contained in:
Philipp Heckel 2021-11-08 09:46:31 -05:00
parent 43c9a92748
commit d453db89a7
5 changed files with 43 additions and 14 deletions

View file

@ -118,7 +118,7 @@ const test = (topic) => {
};
const fetchCachedMessages = async (topic) => {
const topicJsonUrl = `/${topic}/json?poll=1&since=12h`; // Poll!
const topicJsonUrl = `/${topic}/json?poll=1`; // Poll!
for await (let line of makeTextFileLineIterator(topicJsonUrl)) {
const message = JSON.parse(line);
topics[topic]['messages'].push(message);