Skip to content

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

Open
JoeJoeflyn wants to merge 3 commits into
block:mainfrom
JoeJoeflyn:fix/redundant-join-reconcile-membership
Open

fix(relay): re-emit group discovery events on redundant join#3847
JoeJoeflyn wants to merge 3 commits into
block:mainfrom
JoeJoeflyn:fix/redundant-join-reconcile-membership

Conversation

@JoeJoeflyn

Copy link
Copy Markdown

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)

)

Signed-off-by: JoeJoeflyn <thaitainguyen336@gmail.com>
@JoeJoeflyn
JoeJoeflyn requested a review from a team as a code owner July 31, 2026 03:34
@Chessing234

Copy link
Copy Markdown
Contributor

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

Signed-off-by: JoeJoeflyn <thaitainguyen336@gmail.com>
@JoeJoeflyn

JoeJoeflyn commented Jul 31, 2026

Copy link
Copy Markdown
Author

done, added a test for this

…reconcile-membership

Signed-off-by: JoeJoeflyn <thaitainguyen336@gmail.com>
@Chessing234

Copy link
Copy Markdown
Contributor

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

@JoeJoeflyn

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop v0.5.2 shows relay owner as non-member despite active channel_members row

2 participants