[Investigate & Fix] Which list is nos using to populate lists?
AC
- Chk to see if Nos is using the first list it gets back or if its using the latest list to populate follows and mutes.
- If it is using the first list, update the code in both locations so it uses the most recent list.
I have a theory that maybe our code to close the subscription for a "one time" Filter after we receive an event matching the Filter from any relay may cause us to get an old list if one of your relays has an old list and it responds before one of the relays with a newer list. Let's verify that this isn't happening too (and ping me if my description isn't clear enough).
Part 1 is merged, but that's just refactoring and testing. Next, I'll be working on Matt's suggestions in this PR comment: https://github.com/planetary-social/nos/pull/1182#pullrequestreview-2074033193
Part 2 is merged now, with more unit tests around contact lists and how we handle them. These tests confirm that when we have a contact list and we get an older one from a relay, we don't use the older one. They also confirm that if we have a contact list and get a newer one from a relay, we use the newer one.
We still need further investigation into what's causing the bug.
@setch-l We've met the acceptance criteria for this ticket. Nos uses the latest list to populate follows and mutes, so there's no change to make there. We now have unit tests in place to ensure we continue using the most recent list.