I'm curious now 🙂 do you have any example on the code?

Reply to this note

Please Login to reply.

Discussion

Here's one to get reports from visible users.

The app sends to "usersToWatch" every visible reference to a user: think of all profile pictures, names, inside note quotes, and even raw @pubs in the content. At every point in time, there are 5(feed) - 100 (notifications) Nostr users being seen by the user. As the user scrolls, users of interest are added and removed from the list automatically. Meanwhile, this class sends a filter to get Reports from all relays for each user, but only reports since the last time it got those reports for each user.

https://github.com/vitorpamplona/amethyst/blob/b0953310c2d2eb82131e204d35f6d81b7832c0c3/app/src/main/java/com/vitorpamplona/amethyst/service/NostrSingleUserDataSource.kt#L29