fix(notifications/timeline): low lengths. chore(config): add invidious.fdn.fr.

This commit is contained in:
vulet 2021-04-25 15:53:23 +08:00
parent 340fed6346
commit 39a88b2722
3 changed files with 6 additions and 4 deletions

View file

@ -12,7 +12,8 @@ exports.runQuery = function (roomId) {
const len = events.length;
for (let i = len - 1; i >= 0; i--) {
if (past.findIndex((x) => x.created_at === events[i].created_at) === -1) {
if (events[i].created_at < past.slice(18, 19)[0].created_at) return;
const lastStored = past.slice(past.length - 1, past.length);
if (events[i].created_at < lastStored[0].created_at) return;
events[i].label = 'status';
fediverse.utils.formatter(events[i], roomId);
}

View file

@ -12,7 +12,8 @@ exports.runQuery = function (roomId) {
const len = events.length;
for (let i = len - 1; i >= 0; i--) {
if (past.findIndex((x) => x.created_at === events[i].created_at) === -1) {
if (events[i].created_at < past.slice(18, 19)[0].created_at) return;
const lastStored = past.slice(past.length - 1, past.length);
if (events[i].created_at < lastStored[0].created_at) return;
events[i].label = 'notifications';
fediverse.utils.formatter(events[i], roomId);
}