Mercurial > sat_docs
annotate xmpp/xep-proto-jid-mention.xml @ 151:6f8c849daf2a
flatpak (build_manifest): updated org.freedesktop.Platform runtime version:
manifests were using an old 1.6 version of the runtime, this patch fixes them by using the
current 18.8 one. Thanks to that, the main_loop.patch which was made because of an
outdated version of GLib (see https://github.com/flatpak/flatpak/issues/1899) is not
needed anymore and has been removed.
Some useless extensions have also been removed from default manifest.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Jun 2019 20:49:31 +0200 |
parents | 16ce0419a0e9 |
children |
rev | line source |
---|---|
72 | 1 <?xml version='1.0' encoding='UTF-8'?> |
2 <!DOCTYPE xep SYSTEM 'xep.dtd' [ | |
3 <!ENTITY % ents SYSTEM 'xep.ent'> | |
4 %ents; | |
5 ]> | |
6 <?xml-stylesheet type='text/xsl' href='xep.xsl'?> | |
7 <xep> | |
8 <header> | |
9 <title>JID Mention</title> | |
10 <abstract>This specification provides a way for an entity to mention a jid</abstract> | |
11 &LEGALNOTICE; | |
12 <number>xxxx</number> | |
13 <status>ProtoXEP</status> | |
14 <type>Standards Track</type> | |
15 <sig>Standards</sig> | |
16 <approver>Council</approver> | |
17 <dependencies> | |
18 <spec>XMPP Core</spec> | |
19 </dependencies> | |
20 <supersedes/> | |
21 <supersededby/> | |
22 <shortname>NOT_YET_ASSIGNED</shortname> | |
23 <author> | |
24 <firstname>Jérôme</firstname> | |
25 <surname>Poisson</surname> | |
26 <email>goffi@goffi.org</email> | |
27 <jid>goffi@jabber.fr</jid> | |
28 </author> | |
29 | |
30 <revision> | |
31 <version>0.1</version> | |
32 <date>2016-01-16</date> | |
33 <initials>jp</initials> | |
34 <remark><p>First draft.</p></remark> | |
35 </revision> | |
36 | |
37 </header> | |
38 <section1 topic='Introduction' anchor='intro'> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
39 <p>Mentioning somebody is usually done in the context of a multi-user chat: a notification is triggered when somebody's nickname is written, and it often only works when a client is online and monitoring the conversation.</p> |
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
40 <p>But it is more and more common to mention people in other contexts (e.g. microblogging), and it is desirable that this works even when an entity is offline or not aware of the context. This XEP offers a simple solution to mention people in any context, online or offline and even outside of XMPP.</p> |
72 | 41 </section1> |
42 <section1 topic='Requirements' anchor='reqs'> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
43 <p>JID mention must:</p> |
72 | 44 <ul> |
45 <li>work online and offline</li> | |
46 <li>work if the entity is not aware of the context</li> | |
47 <li>work outside of XMPP context (e.g. in a website)</li> | |
48 <li>not be tied to a particular syntax</li> | |
49 <li>(desirable) be easy to implement</li> | |
50 </ul> | |
51 </section1> | |
52 <section1 topic='Glossary' anchor='glossary'> | |
53 <ul> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
54 <li><strong>Mentioning entity</strong> — the entity which wants to mention somebody.</li> |
72 | 55 <li><strong>Mentioned entity</strong> — the entity actually mentioned.</li> |
56 <li><strong>Mentioned URI</strong> — URI where the entity is mentioned.</li> | |
57 <li><strong>PubSub</strong> — &xep0060;.</li> | |
58 <li><strong>MUC</strong> — &xep0045;.</li> | |
59 <li><strong>MIX</strong> — &xep0369;.</li> | |
60 </ul> | |
61 </section1> | |
62 <section1 topic='Mentioning an entity' anchor='mention'> | |
63 | |
64 <section2 topic='Basic syntax' anchor='base'> | |
65 <p>The syntax used by the software willing to mention a jid is up to the implemention. Nickname followed by "<strong>:</strong>" is commonly used in group chats like MUC or Internet Relay Chat (IRC) while "<strong>@</strong>" followed by nickname is often used with microblogging. Note that if it is not possible to associate a nickname with a jid without ambiguity, a bare jid SHOULD be used instead of a nickname.</p> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
66 <p>To mention an entity, a &MESSAGE; stanza must be sent to the bare jid of the entity with a <mention/> elements which MUST have the <strong>'urn:xmpp:mention:0'</strong> namespace. The <mention/> element MUST have a 'uri' attribute which links to the context where the entity has been mentioned. This URI can be the URI of a MUC room, a PubSub node, a Jingle file (e.g. a photo where mentioned entity appears), a website, or anything which makes sense. A <body/> element MUST be present with a human readable text indicating the mentioned URI (e.g. “You have been mentioned on xmpp:xsf@muc.xmpp.org?join”). No other elements or attributes are mandatory.</p> |
72 | 67 <example caption='basic mention of Juliet'><![CDATA[ |
68 <message from='romeo@montage.net' to='juliet@capulet.lit' id='123'> | |
69 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join' /> | |
70 <body> | |
71 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join | |
72 </body> | |
73 </message> | |
74 ]]></example> | |
75 </section2> | |
76 <section2 topic='Context parents' anchor='parents'> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
77 <p>Sometime the 'uri' refers to an element which is a child of other one(s). For instance, a mentioned URI may refer to a website comment with a direct link, which is a part of a more general conversation, or PubSub URI refers to a microblog comment which is a child of another comment, itself a child of the main item.</p> |
76
16ce0419a0e9
xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents:
75
diff
changeset
|
78 <p>In this case, it is desirable for the mentioned entity to know where is the main item, so it can understand the whole context. To deal with this, the mentioning entity MAY declare the path to the uri by adding a <parents/> element which MUST contain one or more <parent/> elements. Each <parent/> element MUST contain an 'uri' attribute with the URI of the parent. If more than one parents are specified, they MUST be put in order, from the more distant one to the last child just before the one specified in the main <mention/> element.</p> |
72 | 79 <example caption='mention of Juliet in microblog comments'><![CDATA[ |
80 <message from='romeo@montage.net' to='juliet@capulet.lit' id='123'> | |
81 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Fdd88c9bc58886fce0049ed050df0c5f2'> | |
82 <parents> | |
83 <parent uri='xmpp:romeo%40montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=2ze57d9c-1c46-21df-830c-002143d3d2qgf' /> | |
84 </parents> | |
85 </mention> | |
86 <body> | |
87 You have been mentioned on xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Fdd88c9bc58886fce0049ed050df0c5f2 | |
88 </body> | |
89 </message> | |
90 ]]></example> | |
91 </section2> | |
92 <section2 topic='Context hint' anchor='context'> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
93 <p>To help the mentioned entity understand the context, the mentioning entity MAY add a <context> element which include human readable text. What is inside is at the discretion of the mentioning entity, it MAY be the paragraph where the entity is mentioned, or anything useful.</p> |
72 | 94 <example caption='mention with context hint'><![CDATA[ |
95 <message from='juliet@capulet.lit' to='romeo@montage.net' id='123'> | |
96 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join'> | |
97 <context> | |
98 O Romeo, Romeo! wherefore art thou Romeo? | |
99 Deny thy father and refuse thy name! | |
100 Or, if thou wilt not, be but sworn my love, | |
101 And I'll no longer be a Capulet. | |
102 </context> | |
103 </mention> | |
104 <body> | |
105 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join | |
106 </body> | |
107 </message> | |
108 ]]></example> | |
109 </section2> | |
74
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
110 <section2 topic='Mention author' anchor='author'> |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
111 <p>If the mention is done outside of XMPP context (e.g.: on a website), the 'from' attribute of the message may be the jid of a server component or a bot. In this case, the mentioning entity can give information on the real author of the mention.</p> |
74
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
112 <p>The author of the mention MAY be specified in <author/> element. If present, it MUST contain one or more of the following elements:</p> |
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
113 <ul> |
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
114 <li><em>JID</em> — the user jid, in a <jid/> element</li> |
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
115 <li><em>email</em> — the user email address, in a <email/> element</li> |
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
116 <li><em>Full Name</em> — the user full name, in a <name/> element</li> |
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
117 <li><em>Nickname</em> — the user nickname, in a <nick/> element</li> |
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
118 </ul> |
72 | 119 <example caption='mention with its author'><![CDATA[ |
120 <message from='xmpp_bot.shakespeare.example.net' to='juliet@capulet.lit' id='123'> | |
121 <mention xmlns='urn:xmpp:mention:0' uri='https://www.ball.shakespeare.example.net'> | |
122 <author> | |
123 <name>Lord Capulet</name> | |
124 <jid>capulet@capulet.lit</jid> | |
125 </author> | |
126 </mention> | |
127 <body> | |
128 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join | |
129 </body> | |
130 </message> | |
131 ]]></example> | |
132 </section2> | |
73 | 133 <section2 topic='Mentioned part' anchor='part'> |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
134 <p>In some contexts, an URI may not be sufficient to locate the exact place of the mention. For instance, it may be useful to know the exact message of a MUC room where the mention did take place. If a mentioning entity wants to specify the exact part of the location where the mention happened, it MAY use a <part/> element. This element contains information dependent on the mentioned URI. For now, only stanza-id is used, but later versions of this specification, or other XEPs can add new elements.</p> |
72 | 135 <p>If the mentioned URI refers to an XMPP context (e.g. a MUC room), a stanza id can be specified. To do so, the &xep0359; semantic is used: mentioning entity MAY add a <stanza-id/> element to the <part/> element as specified in XEP-0359.</p> |
136 <example caption='mention with context hint'><![CDATA[ | |
137 <message from='juliet@capulet.lit' to='romeo@montage.net' id='123'> | |
138 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join'> | |
139 <context> | |
140 O Romeo, Romeo! wherefore art thou Romeo? | |
141 Deny thy father and refuse thy name! | |
142 Or, if thou wilt not, be but sworn my love, | |
143 And I'll no longer be a Capulet. | |
144 </context> | |
145 <part> | |
146 <stanza-id xmlns='urn:xmpp:sid:0' | |
147 id='4b3ec1b6-10ca-498a-af20-378ffaaafddd' | |
148 by='balcony@chat.shakespeare.lit'/> | |
149 </part> | |
150 </mention> | |
151 <body> | |
152 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join | |
153 </body> | |
154 </message> | |
155 ]]></example> | |
156 </section2> | |
157 </section1> | |
158 | |
159 <section1 topic='Configuration' anchor='configuration'> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
160 <p>A server MAY provide a way for clients to configure their notifications (e.g. send by email instead of XMPP, accept mentions only from entities in the roster). To do so, the &xep0050; is used on the well-defined command node <strong>'urn:xmpp:mention:0#configure'</strong>.</p> |
72 | 161 </section1> |
162 | |
163 | |
164 <section1 topic='Discovering Support' anchor='disco'> | |
165 <section2 topic='Announce' anchor='disco_announce'> | |
166 <p>If a entity supports the JID mention protocol, it MUST report that fact by including a service discovery feature of "<em>urn:xmpp:mention:0</em>" in response to a &xep0030; information request:</p> | |
167 <example caption="service discovery information request"><![CDATA[ | |
168 <iq from='kingclaudius@shakespeare.lit/castle' | |
169 id='disco1' | |
170 to='laertes@shakespeare.lit/castle' | |
171 type='get'> | |
172 <query xmlns='http://jabber.org/protocol/disco#info'/> | |
173 </iq> | |
174 ]]></example> | |
175 <example caption="service discovery information response"><![CDATA[ | |
176 <iq from='laertes@shakespeare.lit/castle' | |
177 id='disco1' | |
178 to='kingclaudius@shakespeare.lit/castle' | |
179 type='result'> | |
180 <query xmlns='http://jabber.org/protocol/disco#info'> | |
181 ... | |
182 <feature var='urn:xmpp:mention:0'/> | |
183 ... | |
184 </query> | |
185 </iq> | |
186 ]]></example> | |
187 </section2> | |
188 <section2 topic='Configuration' anchor='disco_config'> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
189 <p>A server doesn't have to announce JID mention namespace as it is a client feature, but if it offers a configuration node as specified in the <link url='#configuration'>configuration section</link>, it MUST announce this fact by including a service discovery feature of "<em>urn:xmpp:mention:0#configure</em>".</p> |
72 | 190 </section2> |
191 </section1> | |
192 | |
193 <section1 topic='Business Rules' anchor='rules'> | |
194 <ol> | |
195 <li>In the case of group chat like MUC or MIX, most of clients already monitor conversations and notify the user if he is mentioned. To avoid to deal with double notifications, the mentioning entity SHOULD NOT mention an other entity using this XEP if the mentioned entity is online and following the conversation (i.e. it joined the MUC room or it subscribed to the MIX conversation).</li> | |
196 <li>On the other hand, if the mentioned entity is not following the conversation (i.e. it didn't joined the MUC room, or it didn't subscribed to the MIX conversation), the mentioning entity SHOULD use this XEP for the mention.</li> | |
197 </ol> | |
198 </section1> | |
199 <section1 topic='Security Considerations' anchor='security'> | |
200 <ol> | |
75
d944c37c36fe
xmpp (xep-proto-jid-mention): typos fixes
souliane <souliane@mailoo.org>
parents:
74
diff
changeset
|
201 <li>To avoid spamming (e.g. a mention of an entity redirecting to an advertisement), a server SHOULD allow a mentioned entity to black list mentioning entities, or to accept mentions only from some entities (e.g. entities in roster). See the <link url='#configuration'>configuration section</link> to see how to set it up. A client MAY offer the same kind of feature, but filtering is preferably done on server side to avoid useless traffic.</li> |
72 | 202 <li>As a mention can link to malicious content, or a user may not want to join a context (and show its presence at the same time), a client SHOULD NOT open automatically the mentioned URI. Instead it SHOULD show a notification to the user, with context hint when available, and propose to join the context or not.</li> |
74
8807a553e5bf
xep (jid mention): fixed mention author
Goffi <goffi@goffi.org>
parents:
73
diff
changeset
|
203 <li>When an author is specified as explained in <link url='#author'>mention author section</link>, the elements, notably the <jid> element, are not checked. A malicious mentioning entity could use fake author information to fool mentioned entity. To avoid this, the mentioned entity's client SHOULD display a warning, like an icon or a message, to indicate that the author can't be checked.</li> |
72 | 204 </ol> |
205 </section1> | |
206 <section1 topic='IANA Considerations' anchor='iana'> | |
207 <p>This document requires no interaction with &IANA;.</p> | |
208 </section1> | |
209 <section1 topic='XMPP Registrar Considerations' anchor='registrar'> | |
210 <section2 topic='Protocol Namespaces' anchor='ns'> | |
211 <p>The ®ISTRAR; includes 'urn:xmpp:mention:0' in its registry of protocol namespaces (see &NAMESPACES;).</p> | |
212 <ul> | |
213 <li>urn:xmpp:mention:0</li> | |
214 </ul> | |
215 </section2> | |
216 <section2 topic='Protocol Versioning' anchor='registrar-versioning'> | |
217 &NSVER; | |
218 </section2> | |
219 </section1> | |
220 <section1 topic='XML Schema' anchor='schema'> | |
221 <code><![CDATA[ | |
222 <?xml version='1.0' encoding='UTF-8'?> | |
223 | |
224 <xs:schema | |
225 xmlns:xs='http://www.w3.org/2001/XMLSchema' | |
226 targetNamespace='urn:xmpp:mention:0' | |
227 xmlns='urn:xmpp:mention:0' | |
228 elementFormDefault='qualified'> | |
229 | |
230 <xs:import namespace='urn:xmpp:sid:1' | |
231 schemaLocation='http://xmpp.org/schemas/sid.xsd'/> | |
232 | |
233 <xs:element name='mention'> | |
234 <xs:complexType> | |
235 <xs:attribute name='uri' use='required' type='xs:string'/> | |
236 <xs:element name='parents' minOccurs='0' maxOccurs='1'> | |
237 <xs:element name='parent' minOccurs='1' maxOccurs='unbounded'> | |
238 <xs:attribute name='uri' use='required' type='xs:string'/> | |
239 </xs:element> | |
240 </xs:element> | |
241 <xs:element name='context' minOccurs='0' maxOccurs='1'> | |
242 <xs:complexType> | |
243 <xs:simpleContent> | |
244 <xs:extension base='xs:string' /> | |
245 </xs:simpleContent> | |
246 </xs:complexType> | |
247 </xs:element> | |
248 <xs:element name='author' minOccurs='0' maxOccurs='1'> | |
249 <xs:complexType> | |
250 <xs:sequence> | |
251 <xs:choice minOccurs='1' maxOccurs='unbounded'> | |
252 <xs:element ref='jid'/> | |
253 <xs:element ref='email'/> | |
254 <xs:element ref='name'/> | |
255 <xs:element ref='nick'/> | |
256 </xs:choice> | |
257 </xs:sequence> | |
258 </xs:complexType> | |
259 </xs:element> | |
260 <xs:element name='part' minOccurs='0' maxOccurs='1'> | |
261 <xs:complexType> | |
262 <xs:sequence> | |
263 <xs:choice minOccurs='1' maxOccurs='unbounded'> | |
264 <xs:element ref='urn:xmpp:sid:1' /> | |
265 </xs:choice> | |
266 </xs:sequence> | |
267 </xs:complexType> | |
268 </xs:element> | |
269 </xs:complexType> | |
270 </xs:element> | |
271 </xs:schema> | |
272 ]]></code> | |
273 </section1> | |
76
16ce0419a0e9
xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents:
75
diff
changeset
|
274 |
16ce0419a0e9
xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents:
75
diff
changeset
|
275 <section1 topic='Acknowledgements' anchor='acks'> |
16ce0419a0e9
xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents:
75
diff
changeset
|
276 <p>Thanks to Adrien Cossa for his review/corrections.</p> |
16ce0419a0e9
xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents:
75
diff
changeset
|
277 </section1> |
16ce0419a0e9
xep (jid mention): added "path" in Context parent description to make it more explicit + acknowledgements section
Goffi <goffi@goffi.org>
parents:
75
diff
changeset
|
278 |
72 | 279 </xep> |