Merge c29d20d5c51feb4ad8024e42551f3c6c8082db16 into c127eb83ab94c069c32d37530d2faecd381cd2a8

This commit is contained in:
Taksh Kothari 2026-09-14 09:43:25 +05:30 committed by GitHub
commit c3c8164400
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,11 +23,15 @@ data class NostrFilter(
* Create filter for NIP-17 gift wraps
*/
fun giftWrapsFor(pubkey: String, since: Long? = null): NostrFilter {
// Each delivered+read DM is typically three gift wraps (message, delivery
// ack, read receipt). A limit of 100 therefore covers only ~33 messages
// inside the lookback, and NIP-01 returns the newest-by-created_at which
// is randomized — so loss is permanent. Match the geohash fetch budget.
return NostrFilter(
kinds = listOf(NostrKind.GIFT_WRAP),
since = since?.let { (it / 1000).toInt() },
tagFilters = mapOf("p" to listOf(pubkey)),
limit = 100
limit = 1000
)
}