mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-09-19 04:59:59 +00:00
Merge c29d20d5c51feb4ad8024e42551f3c6c8082db16 into c127eb83ab94c069c32d37530d2faecd381cd2a8
This commit is contained in:
commit
c3c8164400
@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user