Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature detection for unmanaged groups #1604

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

staab
Copy link
Member

@staab staab commented Nov 22, 2024

Feature detection for unmanaged groups has to exist on two levels:

  • On the group level, so that clients can toggle the richer NIP 29 behavior on or off. Feature detection based on NIP 11's supported_nips field isn't sufficient, since a relay implementation might support NIP 29, but the actual relay may not.
  • On the relay level, since clients need to be able to know whether users can post events to groups that don't yet exist, or whether they have to send a create-group event instead.

The default (obviously) has to be that unmanaged groups are allowed, so unmanaged group support is opt-out.

@staab staab requested a review from fiatjaf November 22, 2024 22:09
@staab staab mentioned this pull request Nov 25, 2024
@staab staab mentioned this pull request Dec 4, 2024
9 tasks
@staab
Copy link
Member Author

staab commented Dec 12, 2024

I removed the nip29.unmanaged setting because it's annoying, and would be complex to have unmanaged groups live alongside managed groups. This just clarifies what is already the case, and edits the copy to be clearer.

Feature detection based on NIP 11's supported_nips field isn't sufficient, since a relay implementation might support NIP 29, but the actual relay may not.

The NIP 11 document should probably be for describing what a particular relay instance offers rather than anything describing the implementation. I was wrong about this.

@fiatjaf
Copy link
Member

fiatjaf commented Dec 13, 2024

I am confused. Can you give some examples of what does it look like to be a relay that supports both unmanaged and managed groups?

Is that a community relay (with already some form of whitelisting and internal rules) that happens to have special rules for some "rooms" -- or is it a relay that allows pretty much anyone to make a random managed group, but also somehow allows ad-hoc unmanaged groups to exist?

@staab
Copy link
Member Author

staab commented Dec 13, 2024

Either one I'd say. My thought was for community relays, rooms would be unmanaged by default, but users could create NIP 29 groups if additional metadata or access controls were desired. But since unmanaged groups provide a subset of the functionality of managed groups, and private nip29 group support implies general nip29 support, it seems pointless to allow unmanaged groups on nip29 relays, since you might as well use the richer, supported groups. In that sense, unmanaged groups are totally orthogonal to nip29 and should probably be their own NIP ultimately.

@fiatjaf
Copy link
Member

fiatjaf commented Dec 13, 2024

I don't think it's totally orthogonal, I think the community relay that evolves to have rooms with permissions is a very good use case.

But also maybe we can have another NIP for unmanaged groups, this doesn't prevent the two NIPs from being compatible at the edges, and then we can have the features explicitly signaled via NIP entries on supported_nips.

But maybe what we should actually do is create a new NIP-11 field called features where we could write ["nip29.unmanaged", "nip29.managed", ...].

@staab
Copy link
Member Author

staab commented Dec 13, 2024

I don't think it's totally orthogonal, I think the community relay that evolves to have rooms with permissions is a very good use case.

I mean in the sense that the migration will probably happen at a point in time, since a relay can upgrade unilaterally, so there's no reason to support both modes at once.

But also maybe we can have another NIP for unmanaged groups, this doesn't prevent the two NIPs from being compatible at the edges, and then we can have the features explicitly signaled via NIP entries on supported_nips.

At this point this is my preference, although unmanaged groups are kind of a weird case, since they're supported unless the relay opts out. So we'd need an unsupported_nips array or something. Anyway, I don't think any of this matters at the moment.

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.

2 participants