Setting up the boundary for one week ago for notifications
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ class AccountNotificationsEoseFromInboxRelaysManager(
|
||||
filterNotificationsToPubkey(
|
||||
relay = it,
|
||||
pubkey = user(key).pubkeyHex,
|
||||
since = since?.get(it)?.time ?: key.feedContentStates.notifications.lastNoteCreatedAtIfFilled(),
|
||||
since = since?.get(it)?.time ?: key.feedContentStates.notifications.lastNoteCreatedAtIfFilled() ?: TimeUtils.oneWeekAgo(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ class AccountNotificationsEoseFromRandomRelaysManager(
|
||||
client: NostrClient,
|
||||
allKeys: () -> Set<AccountQueryState>,
|
||||
) : PerUserEoseManager<AccountQueryState>(client, allKeys) {
|
||||
override fun user(query: AccountQueryState) = query.account.userProfile()
|
||||
override fun user(key: AccountQueryState) = key.account.userProfile()
|
||||
|
||||
/**
|
||||
* Downloads most notifications from the user's own inbox relays.
|
||||
@@ -51,7 +51,7 @@ class AccountNotificationsEoseFromRandomRelaysManager(
|
||||
since: SincePerRelayMap?,
|
||||
): List<RelayBasedFilter>? =
|
||||
(key.account.followsPerRelay.value.keys - key.account.notificationRelays.flow.value).flatMap {
|
||||
val since = since?.get(it)?.time ?: TimeUtils.oneDayAgo()
|
||||
val since = since?.get(it)?.time ?: TimeUtils.oneWeekAgo()
|
||||
filterJustTheLatestNotificationsToPubkeyFromRandomRelays(it, user(key).pubkeyHex, since)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user