buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Leaving the community leaves people in channels and people search

Open rodroudi opened this issue 6 days ago • 0 comments

Love Buzz! We hit this in our community and wanted to pass it along.

When someone leaves the community, or an admin removes them, they still show in the channels they were in. They also still show up in people search with an Add button.

1/ Leave (kind 28936) and admin remove only delete the relay_members row and republish kind 13534. channel_members and the kind 39002 rosters keep the person, so they still appear in channel member lists. On leave or remove, soft-remove their channel memberships and republish 39002. DMs need a path too.

2/ People search has no relay_members filter. That includes NIP-50 kind-0 prefix search, POST /profiles/search, and the directory. A departed identity still shows under "Not in this channel" with an Add button. Limit search to current members, and keep resolving kind-0 by pubkey so history still has a name.

3/ Adds don't check that the target is a relay member. Kind 9000 and kind 41011 (grow_dm) can write a channel_members row for someone who already left. Reject non-members.

4/ Smaller note: on a DM, desktop Add sends kind 9000, and the relay rejects it ("DM members change only through kind:41011"). Desktop doesn't ship a 41011 builder, so Add on a DM fails even for people who are still members.

Repro:

  1. Add a member to a channel, then have them leave the community (or remove them as an admin).
  2. Open that channel's member list. They're still there.
  3. In Manage members, search their name. They show under "Not in this channel" with Add.
  4. Do the same in a DM and click Add. The relay rejects the kind 9000.

Seen on ghcr.io/block/buzz:main at 3876720c. Also checked origin/main at d9c3f4e99.

Related: #6247 (mentions resolve against all known profiles, not current channel members).

rodroudi avatar Nov 26 '26 00:11 rodroudi