buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(relay): re-emit group discovery events on redundant join

Open JoeJoeflyn opened this issue 4 months ago • 4 comments

Summary

  • handle_join_request returned early with no events when the user was already a member, leaving the client unable to reconcile its membership state after relaunch
  • Re-emit group discovery events (kind 39000/39001/39002) on redundant join so the client can reconcile

Fixes #3796

Testing

  • Live: created a channel, joined it, sent 4 redundant join requests — each emitted fresh 39000/39001/39002 events (verified in DB)

JoeJoeflyn avatar Jul 31 '26 03:07 JoeJoeflyn

small and right for #3796. could you cover the redundant-join path with a unit/integration test so it doesnt regress quietly?

chessing234 avatar Jul 31 '26 08:07 chessing234

done, added a test for this

JoeJoeflyn avatar Jul 31 '26 08:07 JoeJoeflyn

re-emitting discovery on redundant join should stop phantom non-members. any chance of event storms if join is retried in a loop?

chessing234 avatar Jul 31 '26 10:07 chessing234

no storm — they're NIP-33 replaceable events, so each re-emit overwrites the previous one instead of piling up

JoeJoeflyn avatar Jul 31 '26 11:07 JoeJoeflyn