1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-22 01:02:17 -05:00
xeps/xep-0452.xml

179 lines
7.3 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>MUC Mention Notifications</title>
<abstract>This specification documents how a user may be informed when they're mentioned in a MUC which they're not currently joined to.</abstract>
&LEGALNOTICE;
<number>0452</number>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0001</spec>
<spec>Etc.</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>NOT_YET_ASSIGNED</shortname>
&jcbrand;
<author>
<firstname>Severino</firstname>
<surname>Ferrer de la Peñita</surname>
<email>soul@blastersklan.com</email>
<jid>soul@blastersklan.com</jid>
</author>
&mwild;
2022-01-11 11:12:49 -05:00
<revision>
<version>0.2.2</version>
<date>2022-01-11</date>
<initials>gh/@xnamed</initials>
<remark>Fix addresses in example</remark>
</revision>
<revision>
<version>0.2.1</version>
<date>2021-02-12</date>
<initials>ps</initials>
<remark>Fix reference to XEP-0297: Stanza Forwarding</remark>
</revision>
2021-02-09 10:05:25 -05:00
<revision>
<version>0.2.0</version>
<date>2021-02-09</date>
<initials>jcb</initials>
<remark>Require nickname registration for notifications to work</remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2021-01-26</date>
<initials>XEP Editor (jsc)</initials>
<remark>Accepted by vote of Council on 2021-01-06.</remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2020-12-17</date>
<initials>jcb</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>The &xep0045; specification does not provide for a mechanism whereby an user might be informed of being mentioned in a Multi-User Chat (MUC) without being present as an occupant of that MUC.</p>
<p>This XEP aims to provide a standardized way in which this might be achieved.</p>
<p>Concerning "being mentioned" in a MUC, we will rely on &xep0372; as the means whereby someone is explicitly mentioned in a MUC message.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>A user's client must be able to receive forwarded groupchat messages from a MUC in which that user is mentioned, while not having an active session in that MUC (i.e. without joining it).</p>
<p>For this to be possible, the MUC needs to know the user's JID and MUC nickname even when that user is not currently present in the MUC. &xep0045; section 7.10 ("Registering with a Room") describes a mechanism whereby a user can register a nickname with a MUC and it is recommended that this is the mechanism used to keep track of users across sessions.</p>
<p>Whether or not mesages are forwarded will be determined by a configuration setting on the MUC.</p>
<p>The MUC owner(s) will therefore determine whether notifications are sent out, and if activated, users may opt in or out (or have that done for them by a privileged user) by having their nicknames registered or not with the MUC.</p>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic='A MUC is configured to send out mention notifications'>
<p>When an owner creates or configures a MUC, the service offers the option to send out mention notifications to non-present, but still affiliated users:</p>
<example caption='Service Sends Configuration Form'><![CDATA[
<iq from='coven@chat.shakespeare.lit'
id='create1'
to='crone1@shakespeare.lit/desktop'
type='result'>
<query xmlns='http://jabber.org/protocol/muc#owner'>
<x xmlns='jabber:x:data' type='form'>
<field type='hidden' var='FORM_TYPE'>
<value>http://jabber.org/protocol/muc#roomconfig</value>
</field>
...
<field
label='Forward messages with mentions to non-present, affiiated users'
type='boolean'
var='muc#roomconfig_forwardmentions'>
<value>0</value>
</field>
...
</x>
</query>
</iq>
]]></example>
<p>The owner specifies a value of "1" or "true" &BOOLEANNOTE; if the feature is desired:</p>
<example caption='MUC Owner Submits Configuration Form'><![CDATA[
<iq from='crone1@shakespeare.lit/desktop'
id='configure1'
to='coven@chat.shakespeare.lit'
type='set'>
<query xmlns='http://jabber.org/protocol/muc#owner'>
<x xmlns='jabber:x:data' type='submit'>
<field type='hidden' var='FORM_TYPE'>
<value>http://jabber.org/protocol/muc#roomconfig</value>
</field>
...
<field var='muc#roomconfig_forwardmentions'>
<value>true</value>
</field>
...
</x>
</query>
</iq>
]]></example>
<p></p>
</section2>
<section2 topic='Notifying a non-present user of being mentioned in a MUC'>
<p>When an affiliated user in a given MUC is referenced in a 'groupchat' message via &xep0372;, and the MUC is configured to forward mentions, then the MUC will forward the message stanza to the user.</p>
<example caption='MUC forwards the message to the users client'><![CDATA[
<message to='hag66@shakespeare.lit' from='coven@chat.shakespeare.lit'>
<mentions xmlns='urn:xmpp:mmn:0'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2020-12-03T14:45:56Z'/>
<message type='groupchat' id='ad22c55c-5a20-4185-8735-af2eb8d459a9'
to='coven@chat.shakespeare.lit'
from='coven@chat.shakespeare.lit/firstwitch'
xml:lang='en'>
<body>secondwitch: Thrice the brinded cat hath mew'd.</body>
<reference xmlns='urn:xmpp:reference:0'
type='mention'
begin='0'
uri='xmpp:hag66@shakespeare.lit'
end='11'/>
<stanza-id xmlns='urn:xmpp:sid:0'
id='5f3dbc5e-e1d3-4077-a492-693f3769c7ad'
by='coven@chat.shakespeare.lit'/>
</message>
</forwarded>
</mentions>
</message>
]]></example>
<p>Notice that in the example above, the entire original 'groupchat' message (including elements added server-side, like the &xep0359; stanza-id) is encapsulated inside a &xep0297; element.</p>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>Similarly to &xep0280;, the security model assumed by this document is that all of the resources for a single user are in the same trust boundary.</p>
<p>Forwarded groupchat messages leak information of who is currently present in a MUC without requiring the user to join the MUC first to find out.</p>
<ul>
<li>Any forwarded copies received by a client MUST be from a valid MUC JID which matches the MUC JID of the encapsulated, forwarded mesages;</li>
<li>any copies that do not meet this requirement MUST be ignored.</li>
</ul>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>None.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='ns'>
<p>The &REGISTRAR; includes 'urn:xmpp:mmn:0' in its registry of protocol namespaces (see &NAMESPACES;).</p>
<ul>
<li>urn:xmpp:mmn:0</li>
</ul>
</section2>
<section2 topic='Protocol Versioning' anchor='registrar-versioning'>
&NSVER;
</section2>
</section1>
</xep>