cmt: Specify a simple way of discovery

This commit is contained in:
PapaTutuWawa 2023-08-19 21:30:29 +02:00
parent 048c766ac7
commit 6f8414f6a6

View File

@ -3,7 +3,7 @@
In different instant messaging services, users have the options to create collections of group chat venues that are logically linked In different instant messaging services, users have the options to create collections of group chat venues that are logically linked
together. together.
This XEP is designed in a modular way, similar to [Mediated Information Exchange]. As such, this XEP only provided the basics for such This XEP is designed in a modular way, similar to [Mediated Information Exchange](https://xmpp.org/extensions/xep-0369.html). As such, this XEP only provided the basics for such
groupings. groupings.
## Design Requirements ## Design Requirements
@ -13,12 +13,36 @@ To aid adoption, the following requirements are considered while creating this X
- Basic communities, i.e. grouped links to other JIDs with additional metadata, should work without server support - Basic communities, i.e. grouped links to other JIDs with additional metadata, should work without server support
- The protocol should be extensible for future evolution - The protocol should be extensible for future evolution
## Basics ## Discovery
A community in XMPP is identified by a JID that "owns" the community. This may be a bare JID or a server's JID. This JID must provide A community in XMPP is identified by a JID that "owns" the community. This may be a bare JID or a server"s JID. This JID must provide
a [PubSub](https://xmpp.org/extensions/xep-0060.html) service on which the community's metadata is stored. This XEP proposes a couple of basic nodes, but other XEPs may extend a [PubSub](https://xmpp.org/extensions/xep-0060.html) service on which the community"s metadata is stored. This XEP proposes a couple of basic nodes, but other XEPs may extend
this set and provide custom extensions. this set and provide custom extensions.
Whether a JID hosts a community is discovery by using a [Service Discovery](https://xmpp.org/extensions/xep-0030.html) items query:
```xml
<iq type="get"
to="community.example.org"
id="nodes1">
<query xmlns="http://jabber.org/protocol/disco#items"/>
</iq>
```
The response MUST contain at least the `proto:urn:xmpp:community:0:info` node:
```xml
<iq type="result"
from="community.example.org"
id="nodes1">
<query xmlns="http://jabber.org/protocol/disco#items">
<item jid="community.example.org" node="proto:urn:xmpp:community:0:info" />
</query>
</iq>
```
## Basics
A community may be either public, meaning that anyone who knows the JID may join and query information about, or private, meaning that users A community may be either public, meaning that anyone who knows the JID may join and query information about, or private, meaning that users
wishing to join MUST be added by an administrator of the community. To accomplish this, public communities SHOULD set all their [PubSub](#) nodes wishing to join MUST be added by an administrator of the community. To accomplish this, public communities SHOULD set all their [PubSub](#) nodes
to have an access model of "open", while private communities SHOULD set all of their nodes to "whitelist". A future XEP may define a way for to have an access model of "open", while private communities SHOULD set all of their nodes to "whitelist". A future XEP may define a way for
@ -26,7 +50,7 @@ administrators to pre-authenticate users such that "invite URLs" to users.
### Description ### Description
A community's information is described by a `<information />` element containing information about the community. A community"s information is described by a `<information />` element containing information about the community.
```xml ```xml
<information xmlns="proto:urn:xmpp:community:0"> <information xmlns="proto:urn:xmpp:community:0">