comparison xmpp/xep-proto-jid-mention.xml @ 75:d944c37c36fe

xmpp (xep-proto-jid-mention): typos fixes
author souliane <souliane@mailoo.org>
date Sat, 16 Jan 2016 18:07:21 +0100
parents 8807a553e5bf
children 16ce0419a0e9
comparison
equal deleted inserted replaced
74:8807a553e5bf 75:d944c37c36fe
34 <remark><p>First draft.</p></remark> 34 <remark><p>First draft.</p></remark>
35 </revision> 35 </revision>
36 36
37 </header> 37 </header>
38 <section1 topic='Introduction' anchor='intro'> 38 <section1 topic='Introduction' anchor='intro'>
39 <p>Usually mentioning somebody is 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> 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>
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 offer a simple solution to mention people in any context, online or offline and even outside of XMPP</p> 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>
41 </section1> 41 </section1>
42 <section1 topic='Requirements' anchor='reqs'> 42 <section1 topic='Requirements' anchor='reqs'>
43 <p>JID mention must</p> 43 <p>JID mention must:</p>
44 <ul> 44 <ul>
45 <li>work online and offline</li> 45 <li>work online and offline</li>
46 <li>work if the entity is not aware of the context</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> 47 <li>work outside of XMPP context (e.g. in a website)</li>
48 <li>not be tied to a particular syntax</li> 48 <li>not be tied to a particular syntax</li>
49 <li>(desirable) be easy to implement</li> 49 <li>(desirable) be easy to implement</li>
50 </ul> 50 </ul>
51 </section1> 51 </section1>
52 <section1 topic='Glossary' anchor='glossary'> 52 <section1 topic='Glossary' anchor='glossary'>
53 <ul> 53 <ul>
54 <li><strong>Mentioning entity</strong> — the entity which want to mention somebody.</li> 54 <li><strong>Mentioning entity</strong> — the entity which wants to mention somebody.</li>
55 <li><strong>Mentioned entity</strong> — the entity actually mentioned.</li> 55 <li><strong>Mentioned entity</strong> — the entity actually mentioned.</li>
56 <li><strong>Mentioned URI</strong> — URI where the entity is mentioned.</li> 56 <li><strong>Mentioned URI</strong> — URI where the entity is mentioned.</li>
57 <li><strong>PubSub</strong> — &xep0060;.</li> 57 <li><strong>PubSub</strong> — &xep0060;.</li>
58 <li><strong>MUC</strong> — &xep0045;.</li> 58 <li><strong>MUC</strong> — &xep0045;.</li>
59 <li><strong>MIX</strong> — &xep0369;.</li> 59 <li><strong>MIX</strong> — &xep0369;.</li>
61 </section1> 61 </section1>
62 <section1 topic='Mentioning an entity' anchor='mention'> 62 <section1 topic='Mentioning an entity' anchor='mention'>
63 63
64 <section2 topic='Basic syntax' anchor='base'> 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> 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>
66 <p>To mention an entity, a &MESSAGE; stanza must be sent to the bare jid of the entity with a &lt;mention/&gt; elements which MUST have the <strong>'urn:xmpp:mention:0'</strong> namespace. The &lt;mention/&gt; element MUST have a 'uri' attribute which link 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 make sense. A &lt;body/&gt; 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> 66 <p>To mention an entity, a &MESSAGE; stanza must be sent to the bare jid of the entity with a &lt;mention/&gt; elements which MUST have the <strong>'urn:xmpp:mention:0'</strong> namespace. The &lt;mention/&gt; 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 &lt;body/&gt; 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>
67 <example caption='basic mention of Juliet'><![CDATA[ 67 <example caption='basic mention of Juliet'><![CDATA[
68 <message from='romeo@montage.net' to='juliet@capulet.lit' id='123'> 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' /> 69 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join' />
70 <body> 70 <body>
71 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join 71 You have been mentioned on xmpp:balcony@chat.shakespeare.lit?join
72 </body> 72 </body>
73 </message> 73 </message>
74 ]]></example> 74 ]]></example>
75 </section2> 75 </section2>
76 <section2 topic='Context parents' anchor='parents'> 76 <section2 topic='Context parents' anchor='parents'>
77 <p>Sometime the 'uri' refers to an element which is a child of other one(s). For instance, a mentioned URI may refers 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 an other comment, itself a child of the main item.</p> 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>
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 add a &lt;parents/&gt; element which MUST contain one or more &lt;parent/&gt; elements. Each &lt;parent/&gt; 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 before the one specified in the main &lt;mention/&gt; element.</p> 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 add a &lt;parents/&gt; element which MUST contain one or more &lt;parent/&gt; elements. Each &lt;parent/&gt; 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 &lt;mention/&gt; element.</p>
79 <example caption='mention of Juliet in microblog comments'><![CDATA[ 79 <example caption='mention of Juliet in microblog comments'><![CDATA[
80 <message from='romeo@montage.net' to='juliet@capulet.lit' id='123'> 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'> 81 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2Fdd88c9bc58886fce0049ed050df0c5f2'>
82 <parents> 82 <parents>
83 <parent uri='xmpp:romeo%40montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=2ze57d9c-1c46-21df-830c-002143d3d2qgf' /> 83 <parent uri='xmpp:romeo%40montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=2ze57d9c-1c46-21df-830c-002143d3d2qgf' />
88 </body> 88 </body>
89 </message> 89 </message>
90 ]]></example> 90 ]]></example>
91 </section2> 91 </section2>
92 <section2 topic='Context hint' anchor='context'> 92 <section2 topic='Context hint' anchor='context'>
93 <p>To help the mentioned entity understand the context, the mentioning entity MAY add a &lt;context&gt; element which include human readable text. What is inside is at the discretion of the mentioning entity, it MAY be the paragraph where the mentioning entity is mentioned, or anything useful.</p> 93 <p>To help the mentioned entity understand the context, the mentioning entity MAY add a &lt;context&gt; 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>
94 <example caption='mention with context hint'><![CDATA[ 94 <example caption='mention with context hint'><![CDATA[
95 <message from='juliet@capulet.lit' to='romeo@montage.net' id='123'> 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'> 96 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join'>
97 <context> 97 <context>
98 O Romeo, Romeo! wherefore art thou Romeo? 98 O Romeo, Romeo! wherefore art thou Romeo?
106 </body> 106 </body>
107 </message> 107 </message>
108 ]]></example> 108 ]]></example>
109 </section2> 109 </section2>
110 <section2 topic='Mention author' anchor='author'> 110 <section2 topic='Mention author' anchor='author'>
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 informations on the real author of the mention.</p> 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>
112 <p>The author of the mention MAY be specified in &lt;author/&gt; element. If present, it MUST contain one or more of the following elements:</p> 112 <p>The author of the mention MAY be specified in &lt;author/&gt; element. If present, it MUST contain one or more of the following elements:</p>
113 <ul> 113 <ul>
114 <li><em>JID</em> — the user jid, in a &lt;jid/&gt; element</li> 114 <li><em>JID</em> — the user jid, in a &lt;jid/&gt; element</li>
115 <li><em>email</em> — the user email address, in a &lt;email/&gt; element</li> 115 <li><em>email</em> — the user email address, in a &lt;email/&gt; element</li>
116 <li><em>Full Name</em> — the user full name, in a &lt;name/&gt; element</li> 116 <li><em>Full Name</em> — the user full name, in a &lt;name/&gt; element</li>
129 </body> 129 </body>
130 </message> 130 </message>
131 ]]></example> 131 ]]></example>
132 </section2> 132 </section2>
133 <section2 topic='Mentioned part' anchor='part'> 133 <section2 topic='Mentioned part' anchor='part'>
134 <p>In some contexts, an URI may be not sufficient to locate the exact place of the mention. For instance, it may be be useful to know the exact message of a MUC room where the mention did take place. If a mentioning entity want to specify the exact part of the location where the mention happened, it MAY use a &lt;part/&gt; element. This element contains informations dependant of the mentioned URI. For now, only stanza-id is used, but later versions of this specification, or other XEPs can add new elements.</p> 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 &lt;part/&gt; 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>
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 &lt;stanza-id/&gt; element to the &lt;part/&gt; element as specified in XEP-0359.</p> 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 &lt;stanza-id/&gt; element to the &lt;part/&gt; element as specified in XEP-0359.</p>
136 <example caption='mention with context hint'><![CDATA[ 136 <example caption='mention with context hint'><![CDATA[
137 <message from='juliet@capulet.lit' to='romeo@montage.net' id='123'> 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'> 138 <mention xmlns='urn:xmpp:mention:0' uri='xmpp:balcony@chat.shakespeare.lit?join'>
139 <context> 139 <context>
155 ]]></example> 155 ]]></example>
156 </section2> 156 </section2>
157 </section1> 157 </section1>
158 158
159 <section1 topic='Configuration' anchor='configuration'> 159 <section1 topic='Configuration' anchor='configuration'>
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> 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>
161 </section1> 161 </section1>
162 162
163 163
164 <section1 topic='Discovering Support' anchor='disco'> 164 <section1 topic='Discovering Support' anchor='disco'>
165 <section2 topic='Announce' anchor='disco_announce'> 165 <section2 topic='Announce' anchor='disco_announce'>
184 </query> 184 </query>
185 </iq> 185 </iq>
186 ]]></example> 186 ]]></example>
187 </section2> 187 </section2>
188 <section2 topic='Configuration' anchor='disco_config'> 188 <section2 topic='Configuration' anchor='disco_config'>
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 <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> 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>
190 </section2> 190 </section2>
191 </section1> 191 </section1>
192 192
193 <section1 topic='Business Rules' anchor='rules'> 193 <section1 topic='Business Rules' anchor='rules'>
194 <ol> 194 <ol>
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> 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> 197 </ol>
198 </section1> 198 </section1>
199 <section1 topic='Security Considerations' anchor='security'> 199 <section1 topic='Security Considerations' anchor='security'>
200 <ol> 200 <ol>
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 for 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> 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>
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> 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>
203 <li>When an author is specified as explained in <link url='#author'>mention author section</link>, the elements, notably the &lt;jid&gt; 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> 203 <li>When an author is specified as explained in <link url='#author'>mention author section</link>, the elements, notably the &lt;jid&gt; 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>
204 </ol> 204 </ol>
205 </section1> 205 </section1>
206 <section1 topic='IANA Considerations' anchor='iana'> 206 <section1 topic='IANA Considerations' anchor='iana'>