diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt index 588aa3ff6..56b964b23 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleEventDataSource.kt @@ -320,7 +320,7 @@ fun groupByEOSEPresence(notes: Set): Collection> = .joinToString(",") }.values .map { - it.sortedBy { it.idHex } + it.sortedBy { it.idHex } // important to keep in order otherwise the Relay thinks the filter has changed and we REQ again } fun groupByEOSEPresence(users: Iterable): Collection> = @@ -331,7 +331,7 @@ fun groupByEOSEPresence(users: Iterable): Collection> = .joinToString(",") }.values .map { - it.sortedBy { it.pubkeyHex } + it.sortedBy { it.pubkeyHex } // important to keep in order otherwise the Relay thinks the filter has changed and we REQ again } fun findMinimumEOSEs(notes: List): Map { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleUserDataSource.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleUserDataSource.kt index a163c176d..7290bc8c3 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleUserDataSource.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleUserDataSource.kt @@ -64,6 +64,7 @@ object NostrSingleUserDataSource : AmethystNostrDataSource("SingleUserFeed") { .map { group -> val groupIds = group.map { it.pubkeyHex } val minEOSEs = findMinimumEOSEsForUsers(group) + listOf( TypedFilter( types = EVENT_FINDER_TYPES, @@ -92,13 +93,11 @@ object NostrSingleUserDataSource : AmethystNostrDataSource("SingleUserFeed") { checkNotInMainThread() usersToWatch.forEach { - if (it.latestMetadata != null) { - val eose = it.latestEOSEs[relayUrl] - if (eose == null) { - it.latestEOSEs = it.latestEOSEs + Pair(relayUrl, EOSETime(time)) - } else { - eose.time = time - } + val eose = it.latestEOSEs[relayUrl] + if (eose == null) { + it.latestEOSEs = it.latestEOSEs + Pair(relayUrl, EOSETime(time)) + } else { + eose.time = time } } }