Past events loading (with two bugs)

This commit is contained in:
miruka
2019-07-05 02:45:30 -04:00
parent 83694d387b
commit ecba7c47ec
5 changed files with 83 additions and 29 deletions

View File

@@ -86,13 +86,13 @@ function onTimelineEventReceived(
"senderId": sender_id,
"content": content,
"isLocalEcho": true
}, 1, 500)
}, 1, 250)
if (found.length > 0) {
timelines.set(found[0], item)
} else {
// Multiple clients will emit duplicate events with the same eventId
timelines.upsert({"eventId": event_id}, item, true, 500)
timelines.upsert({"eventId": event_id}, item, true, 250)
}
}