mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 16:31:04 +00:00
Avoid bug
This commit is contained in:
parent
3b7f08f84b
commit
7a51bfa0c6
@ -785,6 +785,10 @@ export const markAsSeen = async (kind: number, eventsByKey: Record<string, Trust
|
|||||||
const tags = Array.isArray(rawTags) ? rawTags.filter(t => !eventsByKey[t[1]]) : []
|
const tags = Array.isArray(rawTags) ? rawTags.filter(t => !eventsByKey[t[1]]) : []
|
||||||
|
|
||||||
for (const [key, events] of Object.entries(eventsByKey)) {
|
for (const [key, events] of Object.entries(eventsByKey)) {
|
||||||
|
if (events.length === 0) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
const [newer, older] = splitAt(10, events)
|
const [newer, older] = splitAt(10, events)
|
||||||
const ts = first(older)?.created_at || last(newer).created_at - seconds(3, "hour")
|
const ts = first(older)?.created_at || last(newer).created_at - seconds(3, "hour")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user