nos icon indicating copy to clipboard operation
nos copied to clipboard

[Investigate & Fix] Which list is nos using to populate lists?

Open setch-l opened this issue 1 year ago • 1 comments

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.

setch-l avatar May 20 '24 19:05 setch-l

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).

mplorentz avatar May 21 '24 20:05 mplorentz

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

joshuatbrown avatar May 23 '24 20:05 joshuatbrown

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.

joshuatbrown avatar May 31 '24 20:05 joshuatbrown

@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.

joshuatbrown avatar Jun 03 '24 15:06 joshuatbrown