1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-13 21:05:09 -05:00
xeps/xep-0369.xml

1475 lines
86 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'?>
<?xml-stylesheet type="text/css" href="xmpp.css"?>
<xep>
<header>
<title>Mediated Information eXchange (MIX)</title>
<abstract>This document defines Mediated Information eXchange (MIX), an XMPP protocol extension for the exchange of information among multiple users through a mediating service. The protocol can be used to provide human group communication and communication between non-human entities using channels, although with greater flexibility and extensibility than existing groupchat technologies such as Multi-User Chat (MUC). MIX uses Publish-Subscribe to provide flexible access and publication, and uses Message Archive Management (MAM) to provide storage and archiving. </abstract>
&LEGALNOTICE;
<number>0369</number>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XMPP IM</spec>
<spec>XEP-0004</spec>
<spec>XEP-0030</spec>
2016-12-22 03:40:15 -05:00
<spec>XEP-0054</spec>
<spec>XEP-0060</spec>
2016-12-22 03:40:15 -05:00
<spec>XEP-0084</spec>
<spec>XEP-0128</spec>
2016-12-22 03:40:15 -05:00
<spec>XEP-0198</spec>
<spec>XEP-0292</spec>
<spec>XEP-0297</spec>
<spec>XEP-0313</spec>
2016-12-22 03:40:15 -05:00
<spec>XEP-0372</spec>
</dependencies>
<supersedes/>
<supersededby/>
2018-05-14 06:12:38 -04:00
<shortname>MIX-CORE</shortname>
&ksmithisode;
2016-12-02 10:15:30 -05:00
&skille;
2018-05-11 12:09:43 -04:00
<revision>
<version>1.0.0</version>
<date>2018-05-99</date>
<initials>sek</initials>
<remark><p>
Remove PSA as author (as he requested);
2018-05-14 06:12:38 -04:00
Major change to move non-core aspects to different XEPs;
2018-05-11 12:09:43 -04:00
</p></remark>
</revision>
<revision>
2018-05-09 09:42:46 -04:00
<version>0.10.0</version>
<date>2018-05-10</date>
<initials>sek</initials>
<remark><p>
Clarify Owner/Administrator separation from participants and descriptions of channel roles;
Clarify Owner handling on channel join;
New default for configuration nodes present;
Clarify configuration Last Change Made By;
2018-04-30 07:57:57 -04:00
Clarify Mandatory Presence;
2018-05-04 03:47:47 -04:00
Clarification of MIX annotation of roster updates;
Replace contents of section 6.3 (Ensuring Message Delivery) with reference to future XEP;
2018-05-04 06:05:27 -04:00
Add MIX Channels in Roster Section;
2018-05-04 07:00:02 -04:00
Add Proxy JID Architecture Section;
Add MUC Comparison Introduction Section;
Add requirement to clarify MIX is intended for non-human use;
</p></remark>
</revision>
2018-03-15 06:12:51 -04:00
<revision>
<version>0.9.6</version>
2018-03-18 07:15:00 -04:00
<date>2018-03-18</date>
<initials>Editor (jwi)</initials>
2018-03-15 06:12:51 -04:00
<remark><p>
2018-03-18 07:15:00 -04:00
Fix typo errors with single quotes (marj). Editorial fixes (ralph)
2018-03-15 06:12:51 -04:00
</p></remark>
</revision>
2017-06-13 06:56:52 -04:00
<revision>
<version>0.9.5</version>
2018-01-08 09:13:06 -05:00
<date>2018-01-08</date>
<initials>sek</initials>
<remark><p>
Various Clarifications from Dave Cridland review:
Remove Recommendation to do MIX/MUC on separate domains,
2018-01-03 09:40:08 -05:00
Sort Default JID Visibility Preference,
2018-01-03 09:47:09 -05:00
Make Owner optional,
2018-01-03 10:24:08 -05:00
Clarify that Nick is optional;
</p></remark>
</revision> <revision>
2018-01-02 04:12:12 -05:00
<version>0.9.4</version>
2018-01-04 15:08:05 -05:00
<date>2018-01-02</date>
2018-01-02 04:12:12 -05:00
<initials>sek</initials>
<remark><p>
Various Clarifications from Georg Lukas review:
Role Membership reword,
Participant's Node Joining clarification,
Joining Channel Clarification,
Coming online clarification,
Going offline JID error,
Allow servers to limit retract time frame,
2018-01-02 05:17:16 -05:00
Clarify that private messages must not be groupchat,
2018-01-02 05:23:27 -05:00
Creating Channel Clarification,
Address security concerns on Converting a 1:1 Conversation to a Channel,
Remove requirement for all user clients to support MIX,
2018-01-02 06:19:06 -05:00
Change Retract to use MAM-ID;
Ensure use of .example throughout (follow RFC conventions);
2018-01-02 04:12:12 -05:00
</p></remark>
</revision>
<revision>
2017-06-13 06:56:52 -04:00
<version>0.9.3</version>
2017-07-18 06:15:32 -04:00
<date>2017-07-18</date>
2017-06-13 06:56:52 -04:00
<initials>sek</initials>
<remark><p>
Remove Legacy MIX Namespace;
2017-06-13 07:18:39 -04:00
Add mix element in message to hold MIX additional information;
2017-06-13 09:15:17 -04:00
Roster Update Clarifications;
2017-06-13 09:23:18 -04:00
Clarify when messages are delivered to clients;
2017-06-15 08:18:08 -04:00
Extend Roster Get to select format;
Ensure that text defining attributes and elements reference the namespace;
2017-06-16 02:08:31 -04:00
Change mix_nick_register to nick-register;
2017-06-16 02:14:17 -04:00
Separate namespace for roster information;
2017-06-16 06:03:39 -04:00
rename jidmap2 to jidmap-visible;
2017-06-20 10:52:34 -04:00
Namespace bump to mix:1;
Correct from in response of join/leave IQs;
Add capability for MIX in client's server;
2017-06-13 06:56:52 -04:00
</p></remark>
</revision>
<revision>
<version>0.9.2</version>
<date>2017-04-03</date>
<initials>sek</initials>
<remark><p>
Fix xmpp:nodes typos;
Remove namespace references in Info/Config nodes;
2017-04-03 06:26:47 -04:00
Modify Participant and JID Map syntaxes;
Clarifications on subscription to participants node and using this to receive Nick changes;
Replace use of "query" as MIX defined operations for setting nick;
</p></remark>
</revision>
<revision>
<version>0.9.1</version>
<date>2017-03-29</date>
<initials>sek</initials>
<remark><p>
Editorial Changes (addressing comments from Timothée Jaussoin);
</p></remark>
</revision>
<revision>
<version>0.9</version>
<date>2017-03-22</date>
<initials>sek</initials>
<remark><p>
Editorial Changes (mainly from Georg Lukas);
Change to new syntax for proxy JIDs;
Clarify MAM archive on Send;
Extend to sort Selected JID visibility;
Add examples of lookup read JID from proxy JID;
</p></remark>
</revision>
<revision>
<version>0.8.2</version>
2017-03-03 09:43:04 -05:00
<date>2017-03-3</date>
<initials>sek</initials>
<remark><p>
Make example ids pseudo-random;
2017-03-02 11:47:49 -05:00
Shorten the example BIND2 resources;
2017-03-03 04:27:46 -05:00
Fix Disco features to not use second namespace;
2017-03-03 05:14:27 -05:00
Correct encoding of jid-multi;
2017-03-03 05:29:19 -05:00
MAM intro clarification;
Always add to roster, with direction of roster controlled by share preference;
</p></remark>
</revision>
2017-02-19 22:07:19 -05:00
<revision>
<version>0.8.1</version>
<date>2017-02-20</date>
<initials>sek</initials>
<remark><p>
Editorial Updates;
Clarify Access to MAM history, prior to user joining channel;
Add option for user to join without presence;
2017-02-19 22:33:31 -05:00
Check invitee supports MIX;
2017-02-19 22:07:19 -05:00
</p></remark>
</revision>
<revision>
<version>0.8</version>
2017-02-13 06:43:04 -05:00
<date>2017-02-13</date>
<initials>sek</initials>
<remark><p>
Update after Brussels Summit;
2017-02-08 09:04:17 -05:00
Remove Explicit Client Activation and replace with client capability discovery (summit 3);
Limit Indirect to Join/Leave;
Clarify Server use of Disco of Client;
2017-02-08 09:04:17 -05:00
Add MIX capability information to Roster (summit 10);
MIX as Core Spec (summit 1);
Clarifications of password control, voice and name/description (summit 4/5/6)
Removal of Subject and reference future Sticky Messages XEP (summit 7);
2017-02-08 11:35:57 -05:00
Use example JIDs aligned to anticipated BIND2 specification;
2017-02-09 04:17:13 -05:00
Clarify PubSub Node Type;
2017-02-09 04:18:12 -05:00
Add Error handling section;
2017-02-13 06:42:19 -05:00
Substantial Editorial Review;
</p></remark>
</revision>
2017-01-30 09:21:13 -05:00
<revision>
<version>0.7.1</version>
<date>2017-01-30</date>
<initials>sek</initials>
<remark><p>
Ensure all RFC 2119 keywords are capitalized and used correctly;
Use MAM ID to identify message;
Clarify use of the various channel names;
2017-01-30 11:17:04 -05:00
Require all client operations to be direct or indirect (choice is just confusing);
2017-01-30 11:18:48 -05:00
Add description of implicit activation ;
MIX Domains must not contain users;
Clarification on identifying channels in rosters;
2017-01-30 09:21:13 -05:00
</p></remark>
</revision>
<revision>
2017-01-27 11:16:06 -05:00
<version>0.7</version>
<date>2017-01-27</date>
<initials>sek</initials>
<remark><p>
Correct multi-language subject setting;
Remove MIX Proxy terminology and replace with Participant Server Behaviour;
</p></remark>
</revision>
<revision>
<version>0.6.5</version>
<date>2017-01-10</date>
<initials>sek</initials>
<remark><p>
Modify MIX Proxy so that client sends to bare JID
</p></remark>
</revision>
2017-01-10 06:57:04 -05:00
<revision>
<version>0.6.4</version>
<date>2017-01-10</date>
<initials>sek</initials>
<remark><p>
2017-01-10 10:05:27 -05:00
Add node='mix' to channel disco to facilitate MIX and MUC co-existence on same node;
Return Proxy JID on Join;
Adjustment to message reflection
2017-01-10 06:57:04 -05:00
</p></remark>
</revision>
2016-12-22 03:43:08 -05:00
<revision>
<version>0.6.3</version>
<date>2016-12-22</date>
<initials>sek</initials>
<remark><p>
Add Update and Distribution to Table 3;
Correct from in messages from channel;
Use XEP-0297 in message forwarding;
Update Dependent XEPs
</p></remark>
</revision>
2016-12-21 05:46:29 -05:00
<revision>
<version>0.6.2</version>
<date>2016-12-21</date>
<initials>sek</initials>
<remark><p>
2016-12-22 03:43:08 -05:00
Editorial Changes (Georg Lukas Review);
Improve 1:1 Conversion;
2016-12-21 05:46:29 -05:00
Sort out MIX Proxy and Presence Update
</p></remark>
</revision>
2016-12-05 03:57:04 -05:00
<revision>
<version>0.6.1</version>
<date>2016-12-05</date>
<initials>sek</initials>
<remark><p>
Clarify Direct PubSub access to each node type.
2016-12-05 03:57:04 -05:00
</p></remark>
</revision>
2016-12-02 03:44:08 -05:00
<revision>
<version>0.6</version>
<date>2016-12-02</date>
2016-12-02 10:15:30 -05:00
<initials>sek (XEP Editor: ssw)</initials>
2016-12-02 03:44:08 -05:00
<remark><p>
Added Internationalization Consideration section, and various I18n edits;
Added Security Considerations section;
Tombstoning of Redaction changes made optional;
Added a section specifying MIX Proxy;
Change configuration and information node management to directly use PubSub;
2016-12-02 10:15:30 -05:00
Provide for XEP-0202 (vCard4 over XMPP) in addition to vcard-temp support.
2016-12-02 03:44:08 -05:00
</p></remark>
</revision>
2016-11-04 11:57:04 -04:00
<revision>
<version>0.5</version>
2016-11-04 11:57:04 -04:00
<date>2016-11-04</date>
<initials>sek (XEP Editor: ssw)</initials>
2016-11-04 11:57:04 -04:00
<remark><p>
2016-12-02 03:44:08 -05:00
Complete and restructure Administration Section: Creating Channels and modifying configuration;
Add avatar nodes;
Add section on roster handling;
Discovering MIX Services;
Resolve questions on future capabilities;
Administration of Allowed/Banned; clarify Kick functionality is replaced;
User Presence Probes on Channel Start-up;
Add user Presence preference;
Clarify and Expand MAM Archiving;
Sort Retraction;
Add Marker IQ;
2016-11-04 11:57:04 -04:00
Conversion 1:1
</p></remark>
</revision>
2016-09-21 04:55:09 -04:00
<revision>
<version>0.4</version>
<date>2016-09-21</date>
<initials>sek</initials>
<remark><p>Clarification of MIX Proxy concept; Clarify node definitions; Make all nodes optional; Merge ACL node into configuration node; Add information node including avatar; Resolve 4.1 question by accepting provisional answer; Add discovery examples; setting and sharing Subject; Protocol to request channel information and participants; vCard Request; Private Messages; Set user preferences with XEP-0004; Remove references to member and occupant; Add Role Definition; Add Banned and Allowed Nodes; Update Configuration Definition;Add information on original id to message reflected back to sender Add XEP-0372 mechanism to reference channel and informal invite; Channel Invitations </p></remark>
2016-09-21 04:55:09 -04:00
</revision>
2016-09-07 08:50:42 -04:00
<revision>
<version>0.3.1</version>
<date>2016-09-07</date>
<initials>sek</initials>
<remark><p>Introduce MIX Proxy concept. Add MIX capability in client discovery.</p></remark>
</revision>
2016-09-05 05:15:47 -04:00
<revision>
<version>0.3</version>
<date>2016-09-05</date>
<initials>sek</initials>
<remark><p>Addressing comments from review of 0.2 and expansion/clarification of MUC/MIX dual working</p></remark>
</revision>
<revision>
<version>0.2.3</version>
<date>2016-09-01</date>
<initials>ssw, ks</initials>
<remark><p>Cleanup, use precis nickname for nicknames, and allow multiple subject languages.</p></remark>
</revision>
2016-08-25 07:18:37 -04:00
<revision>
2016-08-25 10:13:41 -04:00
<version>0.2.2</version>
2016-08-18 18:38:52 -04:00
<date>2016-08-26</date>
2016-08-25 10:13:41 -04:00
<initials>ssw</initials>
2016-08-18 18:38:52 -04:00
<remark><p>Phrasing and grammar.</p></remark>
2016-08-25 07:18:37 -04:00
</revision>
2016-08-25 10:13:41 -04:00
<revision>
<version>0.2.1</version>
<date>2016-08-25</date>
<initials>sek, egp</initials>
<remark><p>Includes Link Mauve (Emmanuel Gil PEYROT) editorial changes</p></remark>
2016-08-25 10:13:41 -04:00
</revision>
2016-08-16 03:41:36 -04:00
<revision>
<version>0.2</version>
<date>2016-08-16</date>
<initials>sek, ks</initials>
<remark><p>Significant update based on XMPP Summit discussions</p></remark>
</revision>
2016-03-17 16:35:36 -04:00
<revision>
<version>0.1.1</version>
<date>2016-03-17</date>
<initials>XEP Editor (ssw)</initials>
<remark><p>Fix XML in join example.</p></remark>
</revision>
<revision>
<version>0.1</version>
2016-01-07 13:14:50 -05:00
<date>2016-01-07</date>
<initials>XEP Editor (asw)</initials>
<remark><p>Initial published version approved by the XMPP Council.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2015-10-12</date>
<initials>kis/psa</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>The Mediated Information eXchange (MIX) protocol is intended as a replacement for Multi-User Chat (MUC). MUC is a major application of XMPP that was developed in 2002 and standardized in &xep0045;. MIX implements the same basic MUC patterns in a more flexible and extensible way in order to address requirements that have emerged since MUC was developed. MIX supports all of the core chatroom features that are familiar from MUC, such as discussion topics and invitations. Like MUC, it also defines a strong access control model, including the ability to ban users, to name administrators, and to provide controls as to which users can participate in channels.</p>
2016-08-18 18:38:52 -04:00
<p>Several reasons exist for replacing MUC:</p>
<ul>
<li>A number of use cases for group communication have emerged since MUC was first published.</li>
2017-02-13 06:42:19 -05:00
<li>Experience has shown that it is difficult to use MUC to build several kinds of communication applications (such as a multimedia conference) without undesirable adaptations.</li>
<li>It is impractical to address a number of the requirements listed in the next section with MUC or with extensions to MUC. </li>
<li>In the years after MUC was designed, both &xep0060; and &xep0313; have been developed and it is desirable to reuse these building blocks (e.g., MAM can be used for message history) rather than using the less robust methods defined in &xep0045;.</li>
</ul>
<p>Because it is anticipated that there will be significant co-existence between MUC and MIX, this specification is designed so that:</p>
<ul>
<li>XMPP clients can implement MUC and this specification in a way that provides a coherent user experience.</li>
<li>XMPP servers can implement this specification and also provide a MUC interface in order to support clients that only implement MUC.</li>
</ul>
<p>This specification gives guidance on supporting both MUC and MIX representations of chatrooms.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>The following requirements have been identified, which MIX aims to address.</p>
<ol>
<li>A user's participation in a channel persists and is not modified by the user's client going online and offline.</li>
<li>Multiple devices associated with the same account can share the same nick in the channel, with well-defined rules making each client individually addressable.</li>
2017-01-30 09:21:13 -05:00
<li>Channels are NOT REQUIRED to support or reflect presence for participants.</li>
<li>A reconnecting client can quickly resync with respect to messages and presence.</li>
2017-01-30 09:21:13 -05:00
<li>A user MAY (subject to configuration) receive messages from a channel as an invisible observer.</li>
<li>Configuration can be observed externally to the channel (e.g., list of participants, access control rights, etc.).</li>
2017-01-30 09:21:13 -05:00
<li>MIX services SHOULD provide mechanisms to prevent JIDs from being harvested.</li>
<li>MIX and Message Archive Management (MAM) MUST work well together.</li>
<li>A user can determine which channels they participate in.</li>
<li>Provide extensibility regarding data formats that can be sent within a channel (files, structured data, indications about media sources in multimedia conferences, etc.) as well as flexibility regarding which data formats a user wants to receive.</li>
<li>Enable federation of a channel across multiple servers, to provide a service equivalent to "federated MUC" &xep0289;.</li>
2017-02-13 06:42:19 -05:00
<li>Enable sharing of messages on a channel without requiring sharing of presence.</li>
<li>Enable sharing of presence without requiring message sending.</li>
<li>(Desirable) Make it easier to reduce duplicate traffic.</li>
<li>MIX should be suitable for use by humans and as a building block for other clients.</li>
</ol>
</section1>
2018-05-14 06:12:38 -04:00
<section1 topic="MIX Specification Family" anchor="family">
<p>MIX is specified as a family of XEPs that address the full set of requirements. Only two of these XEPs are mandatory for providing a MIX service. The others provide additional services and are used when these additional services are required. Each of these specifications has a short name, which is used to refer the specific XEP. The term MIX is used to refer to the family of XEPs. MIX is extensible, and it is anticipated that further XEPs will be added to this family. The XEPs are: </p>
<ol>
<li>MIX-CORE. &xep0369;. This specification, which is the central mandatory MIX specification. This sets out requirements addressed by MIX and general MIX concepts and framework. It defines joining channels and associated participant management. It defines discovery and sharing of MIX channels and information about them. It defines use of MIX to share messages with channel participants. </li>
<li>MIX-PRESENCE. This optional specification adds the ability for MIX online clients to share presence, so that this can be seen by other MIX clients.</li>
<li>MIX-PAM. This mandatory specification defines how a server supporting MIX clients behaves, to support servers implementing MIX-CORE and MIX-PRESENCE.</li>
<li>MIX-ADMIN. This specifies MIX configuration and administration of MIX.</li>
<li>MIX-ANON. This specifies a mechanism to hide real JIDs from MIX clients and related privacy controls. </li>
<li>MIX-MISC. This specifies a number of small MIX capabilities which are useful but do not need to be a part of MIX-CORE. </li>
<li>MIX-MUC. This defines how MIX and MUC can be used together. </li>
<li>RELIABLE-DELIVERY. MIX-CORE needs messages to be distributed without loss. This specification is important for MIX, but may be useful in other places.</li>
</ol>
</section1>
2016-09-01 09:27:46 -04:00
<section1 topic='Concepts' anchor='concepts'>
<section2 topic="Comparsion to MUC" anchor="concepts-muc-comparison">
<p>
This section is written as an introduction to MIX for those with detailed knowledge of &xep0045;, to summarize key differences and some rationale for the differences. For those unfamiliar with MUC, this section should be ignored.
</p>
<p>
In MUC, a client joins a MUC room. After this, the client is sent history information, presences, and messages until the client leaves the room by going offline. Key MIX features as summarized below:
</p>
<ol>
<li>MIX has "channels", which are equivalent to MUC rooms.</li>
<li>MIX separates out various services, in particular messages and presence. A MUC channel is implemented as a set of PubSub nodes, and a user (not client) can subscribe to a set of nodes. This control means that users can subscribe to presence and/or messages, which gives useful flexibility. This addresses requirements 3 and 5. Subscribing to message and presence nodes gives a service broadly equivalent to MUC.</li>
<li>Messages and presence sent by a MIX channel use the same formats as MUC and do not use PubSub encodings.</li>
<li>Channels do not have a "subject". This MUC capability is not supported by core MIX.</li>
<li>Users join MIX channels for an extended period and participation is not impacted by clients going online and offline (requirement 1). This means that a MIX client uses channel subscriptions as negotiated by the MIX user.</li>
<li>MIX messages and presence are always sent and are addressed to the user (bare JID). This addressing is a consequence of users (not clients) being the participants in a MIX channel; It is a key difference between MUC and MIX. This addressing change means that the user's server needs to have MIX-specific behaviour to correctly distribute arriving messages and presence appropriately to MIX clients; there may be zero or more online clients that support MIX. This server behaviour is specified by MIX. </li>
<li>MIX messages are archived using MAM on the user's server. This enables flexible access to channel history, independent of the MIX channel server. </li>
<li>A user's roster contains the MIX channels to which the user is subscribed. A client can use a MIX roster extension to determine which MIX channels the user is subscribed to. When a client comes online, this will lead to directed presence for the client to be sent to each MIX channel. A MIX channel can then share the user's presence with channel participants that have subscribed to the presence. The MIX channel will also return to the client a full list of presence information for the channel. This means that when a client comes online, it will receive presence updates for the participants in all subscribed MIX channels.</li>
<li>In MIX, a Nick belongs to the user and not to each client.</li>
<li>
2018-05-14 06:12:38 -04:00
Presence is exchanged in MIX by use of a proxy JID, which is a stable JID on the domain of the MUC channel that identifies the user. This proxy JID is used instead of the "Nick as a Resource" mechanism in MUC. To support this, the proxy JID is a primary part of defining a MIX channel participant. Proxy JIDs are also used in MIX-ANON to provide a "JID Hidden" mechanism, to give a service similar to MUC semi-anonymous, that will prevent JID harvesting (requirement 7).
</li>
2018-05-14 06:12:38 -04:00
</ol>
</section2>
2017-02-08 09:04:17 -05:00
<section2 topic="Specification Appproach" anchor="concepts-approach">
<p>
2018-05-14 06:12:38 -04:00
MIX will enable a wide range of auxiliary services. The goal of the MIX family of specification is to set out the core capabilities needed for MIX. It is anticipated that additional XEPs will be written to extend the current MIX specification, and the MIX specification family notes some areas where this may happen. Profiles referencing sets of related MIX XEPs may be developed in the future.
2017-02-08 09:04:17 -05:00
</p>
</section2>
<section2 topic="Core Concepts" anchor="concepts-core">
<p>The following concepts underlie the design of MIX.</p>
<ol>
2017-01-30 09:21:13 -05:00
<li>MIX channels (roughly equivalent to MUC rooms) are hosted on one or more MIX domains, (examples: 'mix.example.com'; 'conference.example.com'; 'talk.example.com'), which are discoverable through &xep0030;. Each channel on a MIX service can then be discovered and queried.</li>
2017-02-13 06:42:19 -05:00
<li> In MIX each channel (e.g., 'channel@mix.example.com') is a specialized pubsub service. This is based on the model from &xep0163; where every user JID (e.g., 'user@example.com') is its own pubsub service. </li>
<li>A channel's pubsub service contains a number of nodes for different event types or data formats. As described below, this document defines several standard nodes; however, future specifications or proprietary services can define their own nodes for extensibility.</li>
<li>Affiliations with the nodes are managed by the MIX service by channel level operations, so that the user does not have to separately manage affiliations with the individual PubSub nodes.
</li>
<li>&xep0313; (MAM) is used for all history access, with each node being individually addressable for MAM queries. This simplifies implementation compared to MUC (which had a specialized and rather limited history retrieval mechanism).</li>
2017-02-13 06:42:19 -05:00
<li>A client can achieve a 'quick resync' of a node by requesting just those changes it has not yet received, using standard MAM protocol. This solves the MUC issue of either receiving duplicate messages when rejoining a room or potentially missing messages.</li>
2017-02-08 09:42:03 -05:00
<li>Because MAM is used for history, only those nodes that have a 'current value' need to store any items in them &mdash; e.g., 'urn:xmpp:mix:nodes:presence' and 'urn:xmpp:mix:nodes:information' would store their current values (with older values being queryable through MAM), while 'urn:xmpp:mix:nodes:messages' would store no items.</li>
2016-09-05 05:15:47 -04:00
<li>A user's participation in a channel outlives their client sessions. A client which is offline will not share presence within the channel, but the associated user will still be listed as an participant. </li>
2017-02-13 06:42:19 -05:00
<li>Presence is sent to participants using bare JID, whether or not the user has an online client. </li>
<li>Online clients MAY register presence, which is then shared with participants who have subscribed to presence.</li>
<li>MIX decouples addressing of channel participants from their nicknames, so that nickname changes do not affect addressing.</li>
<li>Each participant is addressable by a single bare JID, which is a proxy JID (not the user's real JID) to make it straightforward to hide the user's real JID from other channel participants. Full JIDs comprised of this bare JID plus a resource (also anonymized) are then constructed, allowing visibility into the number of online resources participating in a channel.</li>
<li> Although some protocol is shared with MUC, MUC clients are not interoperable with a MIX service. </li>
2017-01-27 07:01:22 -05:00
<li>MIX requires the server to which the MIX client connects to provide functionality to support MIX. This functionality is defined in this specification and referenced as "MIX Participant's Server Behaviour".</li>
2017-01-30 11:51:41 -05:00
<li>MIX domains MUST NOT be used to host end user JIDs. </li>
</ol>
</section2>
<section2 topic="MIX and PubSub" anchor="concepts-pubsub">
2017-02-13 06:42:19 -05:00
<p>MIX is based upon domains providing a MIX service, such as 'mix.shakespeare.example'. Note that although PubSub communication is used, a domain used for MIX is a MIX domain and not a standard &xep0060; domain. Like MUC, there is no requirement on the naming of these domains; the label 'mix' used in examples in this specification and the fact that it is a subdomain of a 'shakespeare.example' service are purely for example.</p>
2018-01-03 06:46:48 -05:00
<p>Every MIX channel is an addressable service based on PubSub (with additional MIX semantics) that will be addressed using a bare JID by other XMPP entities, for example coven@mix.shakespeare.example. While &xep0060; is used as the basis for the MIX model, MIX uses standard presence and groupchat messages to provide an interface to the MIX service that does not expose PubSub protocol for many of the more common functions.
</p>
</section2>
<section2 topic="MIX and MAM" anchor="concepts-mam">
2017-03-03 05:29:19 -05:00
<p> Historical data (such as the messages sent to the channel) is stored in an archive supporting Message Archive Management (MAM) so that clients can subsequently access this data with MAM. Each node can be archived separately (e.g., the presence node or the configuration node). MIX messages are archived by both the MIX channel and the user's server, so that clients can generally use their local MAM archiver. MIX clients can retrieve archived information with MAM in order to quickly resync messages with regard to a channel, and can do so without providing presence information.</p>
</section2>
2018-05-04 06:05:27 -04:00
2018-05-14 06:12:38 -04:00
2018-05-14 06:12:38 -04:00
<section2 topic="Proxy JIDs" anchor="proxy-jid">
2018-05-04 07:00:02 -04:00
2018-05-14 06:12:38 -04:00
<p>
The primary representation of a participant in a MIX channel is a proxy JID, which is an anonymized JID using the same domain as the channel and includes and encoding of the name of the channel and a random identifier. The primary reason for proxy JID is to support presence, as presence messages need to be sent from the domain of the MIX channel. MUC achieves this by using the resource to encode Nick, which does not work well. Proxy JIDs enable Nick changing and support of multiple clients (as the client resource can be shared). MIX provides a simple mechanism for clients to map the proxy JID to Nick and Real Jid, so that these are available to the MIX user. Proxy JIDs are also used to provide the "JID Hidden" mechanism, specified in MIX-ANON.
</p>
<p>
2018-05-14 06:12:38 -04:00
Proxy JIDs are encoded, using the format "&lt;generated identifier&gt;#&lt;channel&gt;@&lt;mix domain&gt;". The generated identifier MUST NOT contain the '#', '/' or '@' characters. The Channel name MAY contain the '#' character. For example in the channel 'coven@mix.shakespeare.example', the user 'hag66@shakespeare.example' might have a proxy JID of '123456#coven@mix.shakespeare.example'. Servers and clients MUST determine that a JID is a proxy JID from context and MUST NOT infer that a JID is a proxy JID because it contains the '#' character.
</p>
<p>
2018-05-14 06:12:38 -04:00
The mapping of real bare JID to proxy JID is defined when a participant joins a channel. While a user is a participant in a Channel, the mapping between real JID and proxy JID MUST NOT be changed. This mapping must be maintained after the user leaves the channel. Proxy JID values MUST NOT be re-used. If a JID that left a channel joins the channel again, the same proxy JID MAY be used again or a different new proxy JID MAY be assigned.
</p>
2018-05-14 06:12:38 -04:00
2018-05-04 07:00:02 -04:00
</section2>
<section2 topic="Standard Nodes" anchor="concepts-nodes">
2018-05-14 06:12:38 -04:00
<p>MIX defines a number standard nodes, and this specification defines three of these nodes and the framework for adding further nodes.
</p>
<table caption="MIX-CORE Nodes">
2016-12-22 02:22:24 -05:00
<tr><th>Name</th><th>Node</th><th>Description</th><th>Update</th><th>Distribution</th></tr>
<tr><td>Messages</td><td>'urn:xmpp:mix:nodes:messages'</td><td>For distributing messages to the channel. Each item of this node will contain a message sent to the channel.</td><td>Message</td><td>Message</td></tr>
<tr><td>Participants</td><td>'urn:xmpp:mix:nodes:participants'</td><td>For storing the list of participants and the associated nick. Channel participants are added when they join the channel and removed when they leave </td><td>Join/Leave/Set Nick</td><td>PubSub</td></tr>
2018-05-14 06:12:38 -04:00
2016-12-22 02:22:24 -05:00
<tr><td>Information</td><td>'urn:xmpp:mix:nodes:info'</td><td>For storing general channel information, such as description. </td><td>PubSub</td><td>PubSub</td></tr>
2018-05-14 06:12:38 -04:00
</table>
<p>
2018-05-14 06:12:38 -04:00
Participants is the only mandatory MIX node for a channel, which defines the set of clients that have joined the channel. All other nodes are OPTIONAL.
MIX provides mechanisms to allow users to conveniently subscribe to a chosen set of nodes and to unsubscribe to all nodes with a single operation. Some nodes are accessed and managed with PubSub, whereas other nodes define MIX specific mechanisms for their use, as shown in the last two columns of the table.
</p>
2018-05-14 06:12:38 -04:00
2017-02-09 03:20:08 -05:00
<section3 topic="Node Archiving" anchor="node-archiving">
<p>
2018-05-14 06:12:38 -04:00
Nodes MAY be archived and where this is done MAM MUST be used. Archiving of the Messages node MUST be done as part of the MIX-CORE specification. Archiving of other nodes is OPTIONAL.
2017-02-09 03:20:08 -05:00
</p>
</section3>
<section3 topic="Messages Node" anchor="messages-node">
2017-02-13 06:42:19 -05:00
<p>
The Messages node is used to distribute messages. The Messages node is a transient node and so no PubSub items are held. Messages MUST go to the associated MAM archive and history is retrieved by use of MAM. Users subscribe to this node to indicate that messages from the channel are to be sent to them. Private Messages are not distributed by the Messages node.
2017-02-13 06:42:19 -05:00
</p>
</section3>
<section3 topic="Participants Node" anchor="participants-node">
2018-05-14 06:12:38 -04:00
<p>Each channel participant is represented as an item of the 'urn:xmpp:mix:nodes:participants' channel node. Each item is named by the bare proxy JID of the participant. For example '123456#coven@mix.shakespeare.example' might name the node item associated with participant 'hag66@shakespeare.example'. Information is stored in a &lt;participant/&gt; element qualified by the 'urn:xmpp:mix:core:0' namespace. The nick associated with the user is optional and is stored in a &lt;nick/&gt; child element of the &lt;participant/&gt; element. The nick for each channel participant MUST be different to the nick of other participants.
</p>
<p>
A Nick MAY be associated with a participant. The nick associated with the user is stored in a &lt;nick/&gt; child element of the &lt;participant/&gt; element. The nick for each channel participant MUST be different to the nick of other participants.
</p>
<p>
The real JID of the user MAY be held in the participants node. When the real JID is not present, the procedures defined in MIX-ANON must be followed.
The user's JID is stored in a &lt;jid/&gt; child element of the &lt;participant/&gt; element.
</p>
<p>
When a user joins a channel, the user's bare proxy JID is added to the participants node by the MIX service. When a user leaves a channel, the user's bare proxy JID is removed from the participants node. The participants node MUST NOT be directly modified using pubsub.
2017-04-03 06:26:47 -04:00
</p>
2018-05-14 06:12:38 -04:00
<p>
Clients will need to read the Participants node to provide useful display of presence information. For this reason, it is anticipated that Participants will be able to read the Participants node. However, for the message distribution specified in MIX-CORE, it is not necessary for clients to be able to read the Participants node.
</p>
2017-04-03 06:26:47 -04:00
<p>
Users MAY subscribe to and read information this node, when permitted by the channel. Standard PubSub access will allow a full list of participants and associated nicks to be determined. By subscribing to the node, a user will be informed of changes to the Participants Node.
</p>
2017-02-09 03:20:08 -05:00
<p>The participants node is OPTIONAL. If the Participants Node is not used, information on channel participants is not shared. If there is no participants node, the access control value 'participants' MUST NOT be used. The Participants node is a permanent node with one item per participant.</p>
<example caption="Value of Participants Node"><![CDATA[
<items node='urn:xmpp:mix:nodes:participants'>
<item id='123456#coven@mix.shakespeare.example'>
2018-05-14 06:12:38 -04:00
<participant xmlns='urn:xmpp:mix:core:0'>
2017-04-03 06:26:47 -04:00
<nick>thirdwitch</nick>
2018-05-14 06:12:38 -04:00
<jid>hag66@shakespeare.example</jid>
2017-04-03 06:26:47 -04:00
</participant>
</item>
</items>
]]></example>
</section3>
2018-05-14 06:12:38 -04:00
<section3 topic="Information Node" anchor="info-node">
2018-05-14 06:12:38 -04:00
<p>The Information node holds information about the channel. It will often be helpful for MIX clients to be able to display this information. The information node contains a single item with the current information.
2017-02-09 03:20:08 -05:00
The information node is named by the date/time at which the item was created. The information node is accessed and managed using standard pubsub. The Information node is a permanent node with a maximum of one item. Users MAY subscribe to this node to receive information updates. The Information node item MAY contain the following attributes, each of which is OPTIONAL:
</p>
<table caption="Information Node Attributes">
<tr><th>Name</th><th>Description</th><th>Field Type</th><th>Values</th><th>Default</th></tr>
<tr><td>'Name'</td><td>A short string providing a name for the channel. For example "The Coven". Typical uses of this value will be to present a user with the name of this channel in a list of channels to select from or as the header of UI display of the channel. It is intended for use where a short string is needed to represent the channel.</td><td>text-single</td><td>-</td><td>-</td></tr>
<tr><td>'Description'</td><td>A longer description of the channel. For example "The Place where the Macbeth Witches Meet up". A typical use would be to provide a user with more information about the channel, for example in a tool tip.</td><td>text-single</td><td>-</td><td>-</td></tr>
<tr><td>'Contact'</td><td>The JID or JIDs of the person or role responsible for the channel.</td><td>jid-multi</td><td>-</td><td>-</td></tr>
2018-05-14 06:12:38 -04:00
</table>
<p>
Name and Description of the channel apply to the whole channel and will usually be changed infrequently.
</p>
<p>
JID visibility is included in the Information Node as this is information that will be useful for participant clients and may also be important when choosing to join a channel.
</p>
2017-02-08 09:42:03 -05:00
<p>The name and description values MUST contain a "text" element and MAY contain additional text elements. Where multiple text elements are provided, each MUST posses an xml:lang attribute that describes the natural language of the element. The format of the Information node follows &xep0004;. This allows configuration to be updated by MIX defined commands and that the results of update commands are the same as the PubSub node.
The following example shows the format of a item in the information node for the example coven@mix.shakespeare.example channel.
</p>
<example caption="Information Node"><![CDATA[
<items node='urn:xmpp:mix:nodes:info'>
<item id='2016-05-30T09:00:00'>
<x xmlns='jabber:x:data' type='result'>
<field var='FORM_TYPE' type='hidden'>
2018-05-14 06:12:38 -04:00
<value>urn:xmpp:mix:core:0</value>
</field>
<field var='Name'>
<value>Witches Coven</value>
</field>
<field var='Description'>
<value>A location not far from the blasted heath where
the three witches meet</value>
</field>
2017-02-19 10:20:09 -05:00
<field var='Contact'>
2018-01-02 06:19:06 -05:00
<value>greymalkin@shakespeare.example</value>
</field>
2018-05-14 06:12:38 -04:00
2017-02-19 10:20:09 -05:00
</x>
</item>
</items>
]]></example>
</section3>
</section2>
2018-05-14 06:12:38 -04:00
<section2 topic="Non-Standard Nodes" anchor="non-standard-nodes">
<p>
2018-01-03 10:24:08 -05:00
The MIX standard allows channels to use non-standard nodes, using names that do not conflict with the standard nodes. Non-Standard nodes MUST NOT duplicate or otherwise provide capability that can be provided by standard nodes.
</p>
</section2>
</section1>
2017-02-09 04:17:13 -05:00
<section1 topic="Error Handling" anchor="error-handling">
<p>
2017-07-18 06:15:32 -04:00
The MIX specification is built on layered services that have defined errors. This enables the core MIX specification to reflect primarily the successful use case, as in almost all cases the error reporting of the layer service provides what is needed. A message sender MUST be prepared to handle any valid error from the layer services. When a message receiver encounters an error situation, it MUST use the most appropriate layer server error to report this issue back to the sender. For example a receiving entity might use the "not authorized" error in response to a disco query that is not authorized. Errors for the following layer services need to be handled for MIX:
2017-02-09 04:17:13 -05:00
</p>
<ol>
<li>IQ. All of the IQ errors of &rfc6120; MUST be supported.</li>
<li>Messages. If a message is received and an error situation is encountered, a message of type error MUST be sent back to the message sender. This message format is specified in &rfc6121; containing an error defined in &rfc6120;, which is the same error set as for IQs.</li>
2017-02-09 04:17:13 -05:00
<li>Presence. Any responses to presence messages MUST follow the rules of &rfc6121;.</li>
<li>PubSub. Where MIX protocol messages use PubSub protocol, the errors defined in &xep0060; MUST be used and supported.</li>
</ol>
</section1>
<section1 topic='Discovery' anchor='discovery'>
<section2 topic='Discovering a MIX service' anchor='disco-service'>
<p>
An entity MAY discover a MIX service or MIX services by sending a Service Discovery items ("disco#items") request to its own server.
</p>
2016-12-01 10:27:40 -05:00
<example caption="Entity queries Server for associated services" ><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='lx09df27'
to='shakespeare.example'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
<iq from='shakespeare.example'
id='lx09df27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='mix.shakespeare.example'
name='Shakespearean Chat Service'/>
<item jid='mix2.shakespeare.example'
name='Another Shakespearean Chat Service'/>
</query>
</iq>
]]></example>
2017-02-13 06:42:19 -05:00
<p>To determine if a domain hosts a MIX service, a &xep0030; info query is sent in the usual manner to determine capabilities.</p>
<example caption="Entity queries a service" ><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='lx09df27'
to='mix.shakespeare.example'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
2018-05-14 06:12:38 -04:00
<p>The MIX service then MUST return its identity and the features it supports, which MUST include the 'urn:xmpp:mix:core:0' feature, and the identity MUST have a category of 'conference' and a type of 'text', as shown in the following example: </p>
<example caption="Service responds with Disco Info result" ><![CDATA[
<iq from='mix.shakespeare.example'
id='lx09df27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity
category='conference'
name='Shakespearean Chat Service'
type='text'/>
2018-05-14 06:12:38 -04:00
<feature var='urn:xmpp:mix:core:0'/>
<feature var='urn:xmpp:mix:core:0#searchable'>
</query>
</iq>
]]></example>
<p>
2018-05-14 06:12:38 -04:00
A MIX service MUST return the 'urn:xmpp:mix:core:0' feature and MAY return the other features listed here:
</p>
<ul>
2018-05-14 06:12:38 -04:00
<li>'urn:xmpp:mix:core:0': This indicates support of MIX, and is returned by all MIX services.</li>
<li>'urn:xmpp:mix:core:0#searchable': This is shown in the above example and indicates that a the MIX Service MAY be searched for channels. This presence of this feature can be used by a client to guide the user to search for channels in a MIX service.</li>
<li>'urn:xmpp:mix:core:0#create-channel': This is described in <link url='#usecase-admin-check-create'> Checking for Permission to Create a Channel</link> in support of channel administration. When an end user client needs to create channels, perhaps for short term usage, this feature helps the client to identify an MIX service to use. It enables a configuration where permanent (searchable) channels are placed in one MIX service and clients will be able to create channels in another MIX service which is not searchable.</li>
</ul>
<p>A MIX service MUST NOT advertise support for &xep0313;, as MAM is supported by the channels and not by the service. A MIX service MUST NOT advertise support for generic &xep0060;, as although MIX makes use of PubSub it is not a generic PubSub service.</p>
</section2>
<section2 topic='Discovering the Channels on a Service' anchor='disco-channel-list'>
<p>The list of channels supported by a MIX service is obtained by a disco#items command. The MIX service MUST only return channels that exist and that the user making the query has rights to subscribe to. </p>
2017-02-13 06:42:19 -05:00
<example caption='Client Queries for Channels on MIX Service'><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
2016-09-19 08:45:09 -04:00
id='kl2fax27'
2018-01-02 06:19:06 -05:00
to='mix.shakespeare.example'
2016-09-19 08:45:09 -04:00
type='get'>
<query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>
]]></example>
<example caption='MIX Service Returns Disco Items Result'><![CDATA[
2018-01-02 06:19:06 -05:00
<iq from='mix.shakespeare.example'
2016-09-19 08:45:09 -04:00
id='kl2fax27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
2016-09-19 08:45:09 -04:00
type='result'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='coven@mix.shakespeare.example' />
<item jid='spells@mix.shakespeare.example' />
<item jid='wizards@mix.shakespeare.example' />
</query>
</iq>
]]></example>
</section2>
<section2 topic='Discovering Channel Information' anchor='disco-channel-info'>
2017-02-13 06:42:19 -05:00
<p>In order to find out more information about a given channel, a user can send a disco#info query to the channel. </p>
<example caption='Entity Queries for Information about a Specific Channel'><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='ik3vs715'
2018-01-02 06:19:06 -05:00
to='coven@mix.shakespeare.example'
type='get'>
2017-02-13 06:42:19 -05:00
<query xmlns='http://jabber.org/protocol/disco#info' node='mix'/>
</iq>
]]></example>
<p>If the querying user is allowed to subscribe, the channel MUST return its identity and the features it supports. Note that a MIX channel MUST support MAM and so the response will always include both MIX and MAM support. All disco queries on a MIX channel and results returned MUST include the attribute node='mix'. The reason for this is to facilitate MIX channels and &xep0045; MUC rooms sharing the same JID. This extra parameter will enable a server to return appropriate information.</p>
<example caption='Channel Returns Disco Info Result'><![CDATA[
2018-01-02 06:19:06 -05:00
<iq from='coven@mix.shakespeare.example'
id='ik3vs715'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
2017-01-10 06:57:04 -05:00
<query xmlns='http://jabber.org/protocol/disco#info' node='mix'>
<identity
category='conference'
name='A Dark Cave'
type='mix'/>
2018-05-14 06:12:38 -04:00
<feature var='urn:xmpp:mix:core:0'/>
<feature var='urn:xmpp:mam:2'/>
</query>
</iq>
]]></example>
</section2>
<section2 topic='Discovering Nodes at a Channel' anchor='disco-channel-nodes'>
2017-02-19 10:20:09 -05:00
<p>Use disco#items to find the nodes associated with a channel. Discovering nodes in MIX MUST use the node='mix' attribute. The MIX service MUST only return nodes that exist and that the user making the query has rights to subscribe to. </p>
<example caption='Entity Queries for Nodes at a Channel'><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='kl2fax27'
2018-01-02 06:19:06 -05:00
to='coven@mix.shakespeare.example'
type='get'>
2017-01-10 06:57:04 -05:00
<query xmlns='http://jabber.org/protocol/disco#items'/ node='mix'>
</iq>
]]></example>
2016-09-19 08:45:09 -04:00
<example caption='Channel Returns Disco Items Result'><![CDATA[
2018-01-02 06:19:06 -05:00
<iq from='coven@mix.shakespeare.example'
id='kl2fax27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
2017-01-10 06:57:04 -05:00
<query xmlns='http://jabber.org/protocol/disco#items' node='mix'>
<item jid='coven@mix.shakespeare.example'
node='urn:xmpp:mix:nodes:presence'/>
<item jid='coven@mix.shakespeare.example'
node='urn:xmpp:mix:nodes:participants'/>
<item jid='coven@mix.shakespeare.example'
node='urn:xmpp:mix:nodes:messages'/>
<item jid='coven@mix.shakespeare.example'
node='urn:xmpp:mix:nodes:config'/>
</query>
</iq>
]]></example>
</section2>
2016-09-19 09:38:33 -04:00
<section2 topic="Determining Information about a Channel" anchor="find-channel-info">
2017-02-13 06:42:19 -05:00
<p>The Information Node contains various information about the channel that can be useful to the user, that the client can access using PubSub, as shown below.</p>
<example caption='Client Requests Channel Information'><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='kl2fax27'
2018-01-02 06:19:06 -05:00
to='coven@mix.shakespeare.example'
type='get'>
<pubsub xlns='http://jabber.org/protocol/pubsub'>
2017-04-03 05:43:07 -04:00
<items node='urn:xmpp:mix:nodes:info'/>
2017-02-13 06:42:19 -05:00
</pubsub>
</iq>
]]></example>
<example caption='MIX Service Returns Channel Information'><![CDATA[
2018-01-02 06:19:06 -05:00
<iq from='coven@mix.shakespeare.example'
id='kl2fax27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
<pubsub xlns='http://jabber.org/protocol/pubsub'>
2018-01-03 10:24:08 -05:00
<items node='urn:xmpp:mix:nodes:info'>
2018-05-14 06:12:38 -04:00
<item id='2016-05-30T09:00:00' xmlns='urn:xmpp:mix:core:0'>
2018-05-04 04:11:09 -04:00
<x xmlns='jabber:x:data' type='result'>
<field var='FORM_TYPE' type='hidden'>
2018-05-14 06:12:38 -04:00
<value>urn:xmpp:mix:core:0</value>
2018-05-04 04:11:09 -04:00
</field>
<field var='Name'>
<value>Witches Coven</value>
</field>
<field var='Description'>
<value>A location not far from the blasted heath where
the three witches meet</value>
</field>
<field var='Contact'>
<value>greymalkin@shakespeare.example</value>
</field>
</x>
2017-02-13 06:42:19 -05:00
</item>
</items>
</pubsub>
</iq>
]]></example>
2016-09-19 09:38:33 -04:00
</section2>
<section2 topic='Determining the Participants in a Channel' anchor='find-channel-participants'>
<p>
2018-05-14 06:12:38 -04:00
Participants in the channel are determined using PubSub retrieval of the Participants Node which will give proxy JID, real JID and nick. It is anticipated that clients using a channel will often determine participants on start-up, to enable display of participants and presence. </p>
<example caption='User&apos;s Client Requests Participant List'><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='kl2fax27'
2018-01-02 06:19:06 -05:00
to='coven@mix.shakespeare.example'
type='get'>
<pubsub xlns='http://jabber.org/protocol/pubsub'>
2017-04-03 05:43:07 -04:00
<items node='urn:xmpp:mix:nodes:participants'/>
2017-02-13 06:42:19 -05:00
</pubsub>
</iq>
]]></example>
<example caption='MIX Service Returns Participant List'><![CDATA[
2018-01-02 06:19:06 -05:00
<iq from='coven@mix.shakespeare.example'
id='kl2fax27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
<pubsub xlns='http://jabber.org/protocol/pubsub'>
2018-05-04 04:11:09 -04:00
<items node='urn:xmpp:mix:nodes:participants'>
<item id='123456#coven@mix.shakespeare.example'>
2018-05-14 06:12:38 -04:00
<participant xmlns='urn:xmpp:mix:core:0'>
2018-05-04 04:11:09 -04:00
<nick>thirdwitch</nick>
2018-05-14 06:12:38 -04:00
<jid>hag66@shakespeare.example</jid>
2018-05-04 04:11:09 -04:00
</participant>
</item>
<item id='87123#coven@mix.shakespeare.example'>
2018-05-14 06:12:38 -04:00
<participant xmlns='urn:xmpp:mix:core:0'>
2018-05-04 04:11:09 -04:00
<nick>top witch</nick>
2018-05-14 06:12:38 -04:00
<jid>hecate@shakespeare.example</jid>
2018-05-04 04:11:09 -04:00
</participant>
</item>
</items>
2017-02-13 06:42:19 -05:00
</pubsub>
<items>
</iq>
]]></example>
2018-05-14 06:12:38 -04:00
</section2>
2016-09-07 08:48:50 -04:00
<section2 topic="Discovering Client MIX Capability" anchor="mix-client-discovery">
<p>
2017-02-13 06:42:19 -05:00
Where a client supports MIX, it MUST advertise this capability in response to a Disco request. This will enable other entities to determine if a client supports MIX, and in particular it facilitates the client's server to determine client support. This can be optimized by use of CAPS. The following example shows a Disco request to and response from a client that supports both MIX and MUC.
2016-09-07 08:48:50 -04:00
</p>
2017-02-13 06:42:19 -05:00
<example caption='Disco Query for MIX support'><![CDATA[
2018-01-02 06:19:06 -05:00
<iq from='juliet@capulet.example/UUID-e3r/9264'
id='d1rt87mr4w'
2018-01-02 06:19:06 -05:00
to='romeo@montague.example/UUID-m2t/3945'
2017-02-13 06:42:19 -05:00
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
2018-01-02 06:19:06 -05:00
<iq from='romeo@montague.example/UUID-m2t/3945'
id='d1rt87mr4w'
2018-01-02 06:19:06 -05:00
to='juliet@capulet.example/UUID-e3r/9264'
2016-09-07 08:48:50 -04:00
type='result'>
2017-02-19 22:07:19 -05:00
<query xmlns='http://jabber.org/protocol/disco#info'>
2016-09-07 08:48:50 -04:00
<feature var='http://jabber.org/protocol/caps'/>
<feature var='http://jabber.org/protocol/disco#info'/>
<feature var='http://jabber.org/protocol/disco#items'/>
<feature var='http://jabber.org/protocol/muc'/>
2018-05-14 06:12:38 -04:00
<feature var='urn:xmpp:mix:core:0'/>
2016-09-07 08:48:50 -04:00
</query>
</iq>
]]></example>
</section2>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
<section2 topic='Common User Use Cases' anchor='usecases-user'>
<section3 topic='Joining a Channel' anchor='usecase-user-join'>
2018-05-14 06:12:38 -04:00
<p>A user joins a channel by sending a MIX "join" command from one of the user's clients. There is no default set of nodes, so the user MUST specify the set of nodes to be subscribed to. To achieve the equivalent service to MUC, a user would subscribe to both messages and presence nodes. A user will typically subscribe to at least the message and/or presence nodes but MAY join and not subscribe to any nodes. Note that the presence node is specified in MIX-PRESECNCE. The &lt;join/&gt; is a child element of &lt;iq/&gt; element. The &lt;join/&gt; element is qualified by the 'urn:xmpp:mix:core:0' namespace. The channel is specified by a 'channel' attribute in the &lt;join/&gt; element. The requested nodes are encoded as &lt;subscribe/&gt; child elements of the &lt;join/&gt; element.
The join leads to the server subscribing the user to each of the requested nodes associated with the channel. The MIX service will also add the user to the participant list by injecting a new item into the "urn:xmpp:mix:nodes:participants" node automatically.
</p>
2017-01-30 09:21:13 -05:00
<p>The default MIX model is that only channel participants are allowed to subscribe to nodes. A MIX channel MAY allow non-participant subscription. This will be handled by clients directly subscribing to the desired PubSub nodes.</p>
<p>
2018-05-14 06:12:38 -04:00
The user's server needs to make roster changes as part of the join functionality. Because of this, the join and leave operations need to operate indirectly. This is fully specified in MIX-PAM.
For this reason the initial join request is sent to the local server with the MIX channel specified as an attribute to the join. The join is sent from a client identified by a full JID to the user's bare JID.
</p>
<example caption="Client sends request to Local Server to Join a Channel"><![CDATA[
<iq type='set'
2017-03-02 11:47:49 -05:00
from='hag66@shakespeare.example/UUID-a1j/7533'
to='hag66@shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<join xmlns='urn:xmpp:mix:core:0'
channel='coven@mix.shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:presence'/>
<subscribe node='urn:xmpp:mix:nodes:participants'/>
2018-05-14 06:12:38 -04:00
<subscribe node='urn:xmpp:mix:nodes:info'/>
</join>
</iq>
]]></example>
<p>
The users server will then pass the request to the MIX channel, with the request coming from the user's bare JID.
</p>
<example caption="User's Server sends Join request to MIX Channel"><![CDATA[
<iq type='set'
2016-09-06 10:43:18 -04:00
from='hag66@shakespeare.example'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<join xmlns='urn:xmpp:mix:core:0'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:presence'/>
<subscribe node='urn:xmpp:mix:nodes:participants'/>
2018-05-14 06:12:38 -04:00
<subscribe node='urn:xmpp:mix:nodes:info'/>
2016-03-11 07:14:23 -05:00
</join>
</iq>
]]></example>
<p>The channel responds to the user's sever with an IQ-result addressed to the user's bare JID. This stanza includes the nodes to which the user has been successfully subscribed, as well as the bare JID that will be used for the user in this channel and added to the participant list. The JID returned in the join is the user's bare proxy JID. The following example shows the result of the above request when the request is completed in full. </p>
<example caption="Channel responds to User's Server"><![CDATA[
<iq type='result'
from='coven@mix.shakespeare.example'
2016-09-06 10:43:18 -04:00
to='hag66@shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<join xmlns='urn:xmpp:mix:core:0' jid='123456#coven@mix.shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:presence'/>
<subscribe node='urn:xmpp:mix:nodes:participants'/>
2018-05-14 06:12:38 -04:00
<subscribe node='urn:xmpp:mix:nodes:info'/>
</join>
</iq>
]]></example>
<p>
The user's server will then make roster modifications as set out in the next section.
After making these changes, the user's server will send the join response back to the client that made the join request, identified by the full JID. This is illustrated below:
</p>
<example caption="User's Server sends response to Client"><![CDATA[
<iq type='result'
from='hag66@shakespeare.example'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-a1j/7533'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<join xmlns='urn:xmpp:mix:core:0' jid='123456#coven@mix.shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:presence'/>
<subscribe node='urn:xmpp:mix:nodes:participants'/>
2018-05-14 06:12:38 -04:00
<subscribe node='urn:xmpp:mix:nodes:info'/>
</join>
</iq>
]]></example>
<p>
2018-05-14 06:12:38 -04:00
This response informs the client that initiated the join request that the request has been completed. Note that the roster changes described in MIX-PAM will lead to roster update information being sent to all of the user's online clients, so that all of the user's clients will be updated with the new MIX channel information.
</p>
<p>
If a user cannot be subscribed to one or more of the requested nodes (e.g., because the node does not exist), but can be subscribed to some the response simply lists the nodes successfully subscribed. If at least one node is requested and none of the nodes requested are successfully subscribed to, an error response is sent indicating the reason that the first node requested was not subscribed to. This error response will also include other nodes requested where subscription failed for the same reason. </p>
2017-02-13 06:42:19 -05:00
<p>
The following response example shows a successful response to the initial request example where
the participant is not subscribed to all nodes associated with the channel (in this case only messages, participants, and information). This example shows the message from the MIX channel to the user's server, which will be modified and sent to the client.
2017-02-13 06:42:19 -05:00
</p>
<example caption="Channel Processes Join With Some Nodes Not Subscribed To"><![CDATA[
<iq type='result'
2016-09-06 10:43:18 -04:00
from='hag66@shakespeare.example'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<join xmlns='urn:xmpp:mix:core:0' jid='123456#coven@mix.shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
<subscribe node='urn:xmpp:mix:nodes:participants'/>
2017-02-08 09:42:03 -05:00
<subscribe node='urn:xmpp:mix:nodes:info'/>
</join>
</iq>
]]></example>
2017-02-13 06:42:19 -05:00
<p>The channel also adds the user to the participants node and sends a notification to subscribers of the participants node. The following example shows such a notification.</p>
2018-05-14 06:12:38 -04:00
<example caption="Channel Distributes New Participant Information"><![CDATA[
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example'
id='5A9C7398-DB13-4BFA-A091-2D466C710AAF'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='urn:xmpp:mix:nodes:participants'>
<item id='123456#coven@mix.shakespeare.example'>
2018-05-14 06:12:38 -04:00
<participant xmlns='urn:xmpp:mix:core:0'>
<nick>third witch</nick>
<jid>hag66@shakespeare.example</jid>
</participant>
</item>
</items>
</event>
</message>
]]></example>
<p>The user that has been added to the channel is identified by the item id of the item added to the Participants node, which is the proxy JID of the new channel participant. Note that the &lt;participant&gt; element MUST NOT include a nick of the user being added. The nick MAY be set after the join.</p>
<p>
At the same time the participant MUST be added to the JID Map node, to map from proxy JID to real JID. For a JID Maybe Visible channel, the participant MUST be added to the JID Maybe Visible Map node. The value in this node MUST reflect the user's visibility preference for the channel and MUST be updated to reflect any changes to this preference.
</p>
<p>
2018-05-14 06:12:38 -04:00
A user MAY subsequently modify subscription to nodes in a channel by sending a subscription modification request encoded as a &lt;update-subscription/&gt; child element of &lt;iq/&gt; element. The &lt;update-subscription/&gt; element is qualified by the 'urn:xmpp:mix:core:0' namespace. The requested notes are encoded as &lt;subscribe/&gt; child elements of the &lt;update-subscription/&gt; element with the node name encoded as a 'node' attribute. This modification goes directly from client to MIX channel, as this change does not impact the roster and so does not need any local action. The following example shows subscription modification.
</p>
<example caption="User Modifies Subscription Request"><![CDATA[
<iq type='set'
2017-03-02 11:47:49 -05:00
from='hag66@shakespeare.example/UUID-a1j/7533'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<update-subscription xmlns='urn:xmpp:mix:core:0'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
</update-subscription>
</iq>
<iq type='result'
from='coven@mix.shakespeare.example'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-a1j/7533'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<update-subscription xmlns='urn:xmpp:mix:core:0' jid='hag66@shakespeare.example'>
<subscribe node='urn:xmpp:mix:nodes:messages'/>
</update-subscription>
</iq>
]]></example>
</section3>
2018-05-14 06:12:38 -04:00
2016-09-30 11:01:04 -04:00
<section3 topic='Leaving a Channel' anchor='usecase-user-leaving'>
2018-05-14 06:12:38 -04:00
<p>Users generally remain in a channel for an extended period of time. In particular the user remains as a participant the channel when the user goes offline. Note that this is different to &xep0045;, where the client leaves a room when going offline. So, leaving a MIX channel is a permanent action for a user across all clients. In order to leave a channel, a user sends a MIX "leave" command to the channel. The leave command is encoded as a &lt;leave/&gt; child element of &lt;iq/&gt; element. The &lt;leave/&gt; element is qualified by the 'urn:xmpp:mix:core:0' namespace, with the channel specified as a 'channel" attribute. When a user leaves the channel, the user's server will remove the channel from the user's roster. Leave commands are sent indirectly through the user's server, to enable roster removal. Leaving is initiated by a client request, as shown in the following example.</p>
<example caption="Client Requests to Leave a Channel"><![CDATA[
<iq type='set'
2017-03-02 11:47:49 -05:00
from='hag66@shakespeare.example/UUID-a1j/7533'
to='hag66@shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<leave xmlns='urn:xmpp:mix:core:0'
2018-03-14 11:21:56 -04:00
channel='coven@mix.shakespeare.example'/>
</iq>
]]></example>
<p>
The user's server will then generate a matching request to the MIX channel.
</p>
2017-02-13 06:42:19 -05:00
<example caption="User's Server sends Leave Request to a Channel"><![CDATA[
<iq type='set'
2016-09-06 10:43:18 -04:00
from='hag66@shakespeare.example'
to='coven@mix.shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<leave xmlns='urn:xmpp:mix:core:0'/>
</iq>
]]></example>
<p>
The MIX channel will then remove the user from the channel, as described below. A response is sent to the user's server.
</p>
<example caption="Channel Confirms Leave to User's Server"><![CDATA[
<iq type='result'
from='coven@mix.shakespeare.example'
to='hag66@shakespeare.example'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<leave xmlns='urn:xmpp:mix:core:0'/>
</iq>
]]></example>
<p>
After receiving the confirmation that the user has left the MIX channel, the user's server will remove the MIX channel entry from the user's roster. The user's server will then notify the client that requested to leave.
</p>
<example caption="User's Server Confirms Leave to Client"><![CDATA[
<iq type='result'
from='hag66@shakespeare.example'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-a1j/7533'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
2018-05-14 06:12:38 -04:00
<leave xmlns='urn:xmpp:mix:core:0'/>
</iq>
]]></example>
<p>When the user leaves the channel, the MIX service is responsible for unsubscribing the user from all nodes in the channel and for removing the user from the participants and presence list. If the user has online presence when the user leaves the channel, the change of presence status caused by removing the user's entry or entries from the presence node will ensure that subscribers to the presence node are correctly updated on presence status.
Deletion from the participants and presence functions as if the item (channel participant) had been deleted using the PubSub retract mechanism with notification set to true. Notification of the deletion is sent to clients subscribed to the participants PubSub nodes, as shown in the example below.
</p>
<example caption="Reporting when User Leaves a Channel"><![CDATA[
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example' id='f5pp2toz'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
2018-05-14 06:12:38 -04:00
<items xmlns='urn:xmpp:mix:core:0' node='urn:xmpp:mix:nodes:participants'>
2018-05-04 03:47:47 -04:00
<item>
<retract id='123456#coven@mix.shakespeare.example'/>
</item>
</items>
</event>
</message>
<message from='coven@mix.shakespeare.example'
2017-02-13 06:42:19 -05:00
to='other-witch@shakespeare.example' id='bar'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
2018-05-14 06:12:38 -04:00
<items xmlns='urn:xmpp:mix:core:0' node='urn:xmpp:mix:nodes:presence' >
2018-05-04 03:47:47 -04:00
<item>
<retract id='123456#coven@mix.shakespeare.example/8765'/>
</item>
</items>
</event>
</message>
]]></example>
</section3>
<section3 topic="Setting a Nick" anchor="usecase-setting-nick">
<p>
2018-05-14 06:12:38 -04:00
Each participant of a channel MAY have a nick, which is how other users in the channel will see the user. In some cases a nick is not needed, for example where a user reads messages in a channel but does not send messages or share presence information. There are four ways that a user's nick can be obtained. The choice of mechanism or mechanisms is dependent on channel policy:
</p>
<ol>
2017-01-30 09:21:13 -05:00
<li>The nick is registered with the user account in some way, for example as part of user provisioning with nick configured as an attribute in a directory service. For example, this could be chosen by corporate services that wish to ensure consistent nick values for a set of users and channels.</li>
<li>The nick is registered with the MIX service, as described in <link url='#usecase-user-register'> Registering a Nick </link>.</li>
<li>The user explicitly sets the nick, as described in this section.</li>
2017-01-30 09:21:13 -05:00
<li>The MIX service generates the nick. In this case it is RECOMMENDED that the assigned nick is a UUID following &rfc4122;.</li>
</ol>
<p>
2018-05-14 06:12:38 -04:00
A user will typically set a nick when joining a channel and MAY update this nick from time to time. The user does this by sending a command to the channel to set the nick. This command is a &lt;setnick/&gt; child element of &lt;iq/&gt; element. The &lt;setnick/&gt; element is qualified by the 'urn:xmpp:mix:core:0' namespace. The nick is encoded as a &lt;nick/&gt; child element of the &lt;setnick/&gt; element. If the user wishes the channel to assign a nick (or knows that the channel will assign a nick) the nick field can be left blank, so that the user can see what is assigned in the result.
</p>
<example caption="User sets Nick on Channel"><![CDATA[
<iq type='set'
2017-03-02 11:47:49 -05:00
from='hag66@shakespeare.example/UUID-a1j/7533'
to='coven@mix.shakespeare.example'
id='7nve413p'>
2018-05-14 06:12:38 -04:00
<setnick xmlns='urn:xmpp:mix:core:0'>
<nick>thirdwitch</nick>
</setnick>
</iq>
]]></example>
<p>
2017-07-18 06:15:32 -04:00
On successful nick assignment, the channel will return the nick that is to be used, noting that this MAY be different to the requested nick. MIX services SHOULD apply the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700;. The channel MAY return a conflict error or other appropriate error.
</p>
<example caption="Channel informs user of Nick"><![CDATA[
<iq type='result'
from='coven@mix.shakespeare.example'
2017-03-02 11:47:49 -05:00
to'hag66@shakespeare.example/UUID-a1j/7533'
id='7nve413p'>
2018-05-14 06:12:38 -04:00
<setnick xmlns='urn:xmpp:mix:core:0'>
<nick>thirdwitch</nick>
</setnick>
</iq>
]]></example>
</section3>
2018-05-14 06:12:38 -04:00
2016-12-01 10:27:40 -05:00
2018-05-14 06:12:38 -04:00
<section3 topic="Coming Online: Synchronizing Message History" anchor="usecase-sync-history">
<p>
2018-05-14 06:12:38 -04:00
A MIX client will typically display message history of the channel to the user. When a client comes online it will need to obtain this message history from the MAM archive associated with the channel on the client's server. There are three basic approaches a client will take:
</p>
2018-05-14 06:12:38 -04:00
<ol>
<li>If the client has previously displayed message history and has been offline for a reasonably small time, the client MAY wish to retrieve all messages since the last one displayed to the user.</li>
<li>The client MAY wish to display a fixed number of messages, perhaps finding more messages if the user subsequently requests.</li>
<li>The client MAY wish to display messages from a recent time period, perhaps finding more messages if the user subsequently requests.</li>
</ol>
<p>To achieve this, the client will query the user's own MAM archive using &xep0313;, with the query filtered by the channel JID. This gives the client flexibility to retrieve and display message history in a manner appropriate to the client implementation.</p>
<p>
2018-05-14 06:12:38 -04:00
The only exception to this is when a user wishes to access message history in the channel prior to when the user joined the channel. To achieve this, the client will use MAM to retrieve message history directly from the MAM Archive of the MIX channel.
2017-04-03 06:26:47 -04:00
</p>
2018-05-14 06:12:38 -04:00
</section3>
2018-05-14 06:12:38 -04:00
<section3 topic='Sending a Message' anchor='usecase-user-message'>
2017-01-27 07:01:22 -05:00
<p>A client sends a message directly to a MIX channel as a standard groupchat message, in exactly the same way as for &xep0045;. Messages are sent directly to the MIX channel from the user's client. The message id is selected by the client.</p>
<example caption="User Sends Message to Channel"><![CDATA[
2017-03-02 11:47:49 -05:00
<message from='hag66@shakespeare.example/UUID-a1j/7533'
to='coven@mix.shakespeare.example'
id='92vax143g'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
</message>
]]></example>
2017-06-13 07:18:39 -04:00
<p>
2018-05-14 06:12:38 -04:00
The MIX channel then adds information to the message using a &lt;mix&gt; element qualified by the 'urn:xmpp:mix:core:0' namespace. This enables are receiver of the MIX message to determine the message sender. This element contains two child elements:
2017-06-13 07:18:39 -04:00
</p>
<ol>
2018-05-14 06:12:38 -04:00
<li>A &lt;nick&gt; element that contains the Nick of the message sender, taken from the Participants Node. This MUST be present if a Nick is defined for the user.</li>
<li>A &lt;jid&gt; element containing the real JID of the sender. This MUST be present, unless following the "JID Hidden" model defined in MIX-ANON. If this element is omitted, the &lt;nick&gt; and &lt;proxy-jid&gt; elements MUST be present.</li>
<li>A &lt;proxy-jid&gt; element contains the sender's proxy JID. This MUST be present if &lt;jid&gt; is omitted and MUST not be present if &lt;jid&gt; is present.</li>
2017-06-13 07:18:39 -04:00
</ol>
<p>The MIX channel then puts a copy of the message into the MAM archive for the channel and sends a copy of the message to each participant in
2017-06-15 10:35:33 -04:00
standard groupchat format. These messages sent by the channel are addressed to the bare JID of each participant and this will be handled by the participant's local server. The message 'from' attribute is the JID of the channel. The id of the message is the ID from the MAM archive and NOT the id used by the sender. The message placed in the MAM archive is the reflected message without a 'to' attribute.</p>
<example caption="Channel Puts Message in MAM Archive"><![CDATA[
<message from='coven@mix.shakespeare.example'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
2018-05-14 06:12:38 -04:00
<mix xmlns='urn:xmpp:mix:core:0'>
2017-06-13 07:18:39 -04:00
<nick>thirdwitch</nick>
2018-05-14 06:12:38 -04:00
<jid>hag66@shakespeare.example</jid>
2017-06-13 07:18:39 -04:00
</mix>
</message>
]]></example>
<example caption="Channel Reflects Message to Participants"><![CDATA[
2017-01-10 10:02:24 -05:00
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
2018-05-14 06:12:38 -04:00
<mix xmlns='urn:xmpp:mix:core:0'>
<nick>thirdwitch</nick>
<jid>hag66@shakespeare.example</jid>
</mix>
</message>
]]></example>
<example caption="Channel Reflects Message to Participants with Proxy JID"><![CDATA[
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
<mix xmlns='urn:xmpp:mix:core:0'>
2017-06-13 07:18:39 -04:00
<nick>thirdwitch</nick>
<jid>123456#coven@mix.shakespeare.example</jid>
</mix>
</message>
]]></example>
2018-05-14 06:12:38 -04:00
<p>
2018-05-14 06:12:38 -04:00
2017-06-13 07:18:39 -04:00
The messages sent to participants have a different message id to the originally submitted message. This does not impact most recipients, but it does not allow the message originator to correlate the message with the submitted message. To address this the MIX channel MUST include an additional &lt;submission-id&gt; element in the &lt;mix&gt; element of the message copy going back to the originator's bare JID. The &lt;submission-id&gt; element holds the original id provided by the sender. This enables the originator to correlate the received message with the message submitted.
</p>
<example caption="Channel Reflects Message back to Originator"><![CDATA[
2017-01-10 10:02:24 -05:00
<message from='coven@mix.shakespeare.example'
to='hag66@shakespeare.example'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
2018-05-04 04:11:09 -04:00
<body>Harpier cries: 'tis time, 'tis time.</body>
2018-05-14 06:12:38 -04:00
<mix xmlns='urn:xmpp:mix:core:0'>
2018-05-04 04:11:09 -04:00
<nick>thirdwitch</nick>
2018-05-14 06:12:38 -04:00
<jid>hag66@shakespeare.example</jid>
2018-05-04 04:11:09 -04:00
<submission-id>92vax143g</submission-id>
</mix>
</message>
]]></example>
</section3>
2018-05-14 06:12:38 -04:00
</section2>
2018-05-14 06:12:38 -04:00
2016-11-04 11:27:54 -04:00
<section2 topic="Ensuring Message Delivery" anchor="use-ensure-delivery">
<p>
It is important that messages are all transferred from the MIX channel to the server associated with the each channel participant. Transfer between servers will typically happen quickly and &xep0198; will deal with short connection failures between servers. Longer connection failures could lead to message loss. This would lead to online users (who remain connected to their servers) missing messages, and to messages being missed out of the user archive.
</p>
2016-11-04 11:27:54 -04:00
<p>
2018-05-14 06:12:38 -04:00
To avoid missing messages, use is made of RELIABLE-DELIVERY.
2016-11-04 11:27:54 -04:00
</p>
2016-11-04 11:27:54 -04:00
</section2>
<section2 topic="Use of MAM" anchor="use-mam">
<p>
All messages sent to a MIX channel MUST be archived using MAM in association with the MIX channel. All messages MUST also be archived on the server associated with each channel participant receiving the message, which enables clients to always retrieve messages from the clients MAM archive. Other channel nodes MAY be archived.
</p>
<section3 topic="Archive of Messages" anchor="use-mam-messages">
<p>
2017-02-08 09:42:03 -05:00
Messages sent to participants MUST be archived by both the MIX channel and by the user's server. This MAY include presence messages. Correct MIX operation relies on messages being archived.
</p>
</section3>
<section3 topic="Retrieving Messages" anchor="use-mam-retrieve">
<p>
Clients will retrieve MIX messages using standard MAM protocol from the user's archive. The MAM query will filter based on the channel JID to enable access to messages from a given channel. This gives the user a simple mechanism to access all messages sent to the channel. MAM can be used to retrieve older messages that have not been cached by the client.
</p>
<p>
2017-01-30 09:21:13 -05:00
Messages can also be retrieved from the channel by addressing MAM queries to the channel JID. This will behave like a standard MAM archive. This can be useful for administrators to access archived messages. It can also be useful for new channel participants to access the historical archives.
</p>
</section3>
<section3 topic="MAM Use with other Channel Nodes" anchor="use-mam-other-nodes">
<p>
2017-01-30 09:21:13 -05:00
A MIX Channel MAY use MAM to archive nodes other than message nodes. Clients with rights to access these archives MAY use MAM to do this, specifying the PubSub node in the MAM query addressed to the channel.
</p>
</section3>
</section2>
<section2 topic='Administrative Use Cases' anchor='usecases-admin'>
<section3 topic='Checking For Permission To Create a Channel' anchor='usecase-admin-check-create'>
<p>
2018-05-14 06:12:38 -04:00
MIX does not standardize an access control model for creating and deleting MIX channels. The choice is left to the MIX implementer, and could be a very simple or complex approach. A client can determine if it has permission to create a channel on a MIX service, which MAY be used to control options presented to the user. This is achieved by a disco command on the MIX service. If the 'urn:xmpp:mix:core:0#create-channel' feature is returned, the user is able to create a channel.
</p>
<example caption="Client determines Capability to Create a Channel" ><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-c8y/1573'
id='lx09df27'
to='mix.shakespeare.example'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
<iq from='mix.shakespeare.example'
id='lx09df27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-c8y/1573'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity
category='conference'
name='Shakespearean Chat Service'
type='text'/>
2018-05-14 06:12:38 -04:00
<feature var='urn:xmpp:mix:core:0'/>
<feature var='urn:xmpp:mix:core:0#create-channel'>
</query>
</iq>
]]></example>
</section3>
<section3 topic='Creating a Channel' anchor='usecase-admin-create'>
<p>
2018-05-14 06:12:38 -04:00
A client creates a channel by sending a simple request to the MIX service. A channel MAY be created with default parameters, as shown in the following example. The result MUST include the name of the channel which MUST match the channel name in the request (if present). The create is encoded as a &lt;create/&gt; child element of &lt;iq/&gt; element. The &lt;create/&gt; is qualified by the 'urn:xmpp:mix:core:0' namespace. The &lt;create/&gt; element MUST have a 'channel' attribute to specify the channel name. This attribute specifies the value that will be used in the LHS of the JID for the MIX channel.
</p>
<example caption="Creating a Channel with Default Parameters" ><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-a1j/7533'
id='lx09df27'
to='mix.shakespeare.example'
type='set'>
2018-05-14 06:12:38 -04:00
<create channel='coven' xmlns='urn:xmpp:mix:core:0'/>
</iq>
<iq from='mix.shakespeare.example'
id='lx09df27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-a1j/7533'
type='result'>
2018-05-14 06:12:38 -04:00
<create channel='coven' xmlns='urn:xmpp:mix:core:0'/>
</iq>
]]></example>
2018-05-14 06:12:38 -04:00
<p>
2018-05-14 06:12:38 -04:00
When a channel is created with default parameters, the Owner in the configuration is set to the JID that creates the channel. Where parameters are included, the Owner or Owners MUST be specified explicitly. If an owner is specified that is not the JID creating the channel, the owner is recommended to verify that this user accepts the responsibility of being an owner of this channel. Protocol to support this verification may be specified in a future XEP. Note that the 'Last Change Made By' in configuration node MUST be set to the JID that creates the channel. Modifying channel parameters is specified in MIX-ADMIN.
</p>
</section3>
<section3 topic='Creating a Channel for Ad Hoc Use' anchor='usecase-admin-create-adhoc'>
<p>
2017-02-13 06:42:19 -05:00
Channels MAY be created for ad hoc use between a set of users. Channels of this nature will have channel name created by the server and will not be addressable or discoverable. Here a channel is created without specifying the channel name. Parameters for the channel MAY also be specified.
</p>
<example caption="Creating a Channel for Ad Hoc Use" ><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-a1j/7533'
id='lx09df27'
to='mix.shakespeare.example'
type='set'>
2018-05-14 06:12:38 -04:00
<create xmlns='urn:xmpp:mix:core:0'/>
</iq>
<iq from='mix.shakespeare.example'
id='lx09df27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-a1j/7533'
type='result'>
2018-05-14 06:12:38 -04:00
<create channel='A1B2C345' xmlns='urn:xmpp:mix:core:0'/>
</iq>
]]></example>
2016-11-04 11:45:48 -04:00
</section3>
2018-05-14 06:12:38 -04:00
2016-11-04 11:45:48 -04:00
<section3 topic='Destroying a Channel' anchor='usecase-admin-destroy'>
<p>
2018-05-14 06:12:38 -04:00
MIX channels are always explicitly destroyed by an owner of the channel or by a server operator. There is no concept of temporary channel, equivalent to &xep0045; temporary room which is automatically destroyed by the server when the users leave. However, channels MAY be configured with an explicit lifetime, after which the channel MUST be removed by the MIX service; This is specified in MIX-ADMIN. Where a channel is created for ad hoc use, it MAY be desirable to keep the channel for history reference or for re-use by the same set of users. Note that the owner of the channel does not need to have presence registered in the channel in order to destroy it.
</p>
<p>
2018-05-14 06:12:38 -04:00
The destroy operation is encoded as a &lt;destroy/&gt; child element of an &lt;iq/&gt; element. The &lt;destroy/&gt; element is qualified by the 'urn:xmpp:mix:core:0' namespace. The &lt;destroy/&gt; element MUST have a 'channel' attribute to specify the channel to be destroyed.
A client destroys a channel using a simple set operation, as shown in the following example.
</p>
<example caption="Client Destroys a Channel" ><![CDATA[
2017-03-02 11:47:49 -05:00
<iq from='hag66@shakespeare.example/UUID-a1j/7533'
id='lx09df27'
to='mix.shakespeare.example'
type='set'>
2018-05-14 06:12:38 -04:00
<destroy channel='coven' xmlns='urn:xmpp:mix:core:0'/>
</iq>
<iq from='mix.shakespeare.example'
id='lx09df27'
2017-03-02 11:47:49 -05:00
to='hag66@shakespeare.example/UUID-a1j/7533'
type='result'>
</iq>
]]></example>
</section3>
<section3 topic='Server Destroying a Channel' anchor='usecase-server-destroy'>
<p>
A server MUST destroy a channel that has exceeded its specified explicit lifetime.
2017-01-30 09:21:13 -05:00
Servers MAY destroy channels which have no participants and/or presence according to local policy. There will often be good reasons to not destroy rooms in these scenarios, in particular to facilitate channel re-use and history access.
</p>
</section3>
2018-05-14 06:12:38 -04:00
</section2>
</section1>
2016-12-02 10:15:30 -05:00
<section1 topic="Capabilities not provided in MIX" anchor="not-included-from45">
<p>This section lists a number of capabilities not specified in the core MIX which are provided in &xep0045;. These capabilities will not be added to core MIX but they could in the future be specified as independent XEPs.</p>
2016-12-02 10:15:30 -05:00
<section2 topic="Password Controlled Channels" anchor="password-control">
<p>
&xep0045; provides a mechanism to control access to MUC rooms using passwords. An equivalent mechanism is not included in core MIX, as it has a number of security issues. Control of access to channels is better achieved using an explicit list of participants.
2016-12-02 10:15:30 -05:00
</p>
</section2>
<section2 topic="Voice Control" anchor="voice-control">
<p>
&xep0045; defines a mechanism so that MUC moderators can control who is able to send messages to a MUC room using a "voice" mechanism. MIX does not provide an exact functional equivalent, although access control to channels enables some of the goals of voice control to be achieved in a different manner.
2016-12-02 10:15:30 -05:00
</p>
</section2>
2017-02-08 09:42:03 -05:00
<section2 anchor="not-subject" topic="Subject">
<p>&xep0045; provide a Subject capability to enable setting of the current topic of discussion. The Name and Description attributes provided by MIX enable descriptive information to be associated with a channel. These attributes can replace Subject in the way it is used in many MUC rooms, but they do not reflect the more limited topic nature of Subject.</p>
<p>It is likely that a new XEP to be used with MIX will be written, perhaps using a "Sticky Messages" approach to fulfil the Subject capability using a different approach. </p>
</section2>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>
2017-02-08 09:42:03 -05:00
<p>MIX allows specification of a number of human readable strings associated with a MIX channel, in particular the name and description information of a MIX channel. These strings MAY have language set using an xml:lang attribute, and multiple values MAY be set provided that each one is distinguished using xml:lang.
2016-11-30 05:06:53 -05:00
</p>
2016-12-02 10:15:30 -05:00
2016-11-30 05:06:53 -05:00
<p>Nicknames SHOULD be normalized using the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700;. </p>
</section1>
2016-12-02 10:15:30 -05:00
<section1 topic='Security Considerations' anchor='security'>
2017-01-30 09:21:13 -05:00
<p>MIX is built over MAM and PubSub and the security considerations of &xep0313; and &xep0060; MUST be considered. These services protect MIX channel information, which can be sensitive and needs appropriate protection.</p>
<p>MIX channels MAY be JID Hidden, in order to hide the JIDs of channel participants from those accessing the channel. Care MUST be taken to ensure that JIDs are fully hidden. In particular when proxy JIDs are prepared, this MUST be done in a manner which ensure that the real JIDs cannot be determined. Where nicks are assigned by a channel, this MUST be done in a way that does not expose the JID.</p>
2016-11-30 05:25:14 -05:00
<p>
There is no MIX equivalent to &xep0045; password controlled rooms, which avoids a number of security issues.
</p>
<p>
2018-05-14 06:12:38 -04:00
MIX-ADMIN defines flexible access control options, which MUST be used in a manner appropriate to the security requirements of MIX users and services.
</p>
2016-11-30 05:25:14 -05:00
</section1>
2016-12-02 10:15:30 -05:00
<section1 topic='IANA Considerations' anchor='iana'>
<p>None.</p>
</section1>
2016-12-02 10:15:30 -05:00
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
2017-01-30 09:21:13 -05:00
<p>The urn:xmpp:mix namespace needs to be registered.</p>
</section1>
2016-12-02 10:15:30 -05:00
<section1 topic='XML Schema' anchor='schema'>
<p>To be supplied when MIX progresses to proposed standard.</p>
</section1>
2016-12-02 10:15:30 -05:00
<section1 topic='Acknowledgements' anchor='ack'>
2018-05-11 12:09:43 -04:00
<p>Peter St Andre provided key early input to MIX and worked on the original specification with Kevin Smith. </p>
<p>Thanks to the following who have made contributions to the ongoing MIX specification development: Dave Cridland, Tarun Gupta, Philipp Hancke, Waqas Hussain, Timothée Jaussoin, Evgeny Khramtsov, Georg Lukas, Tobias Markmann, Ralph Meijer, Edwin Mons, Emmanuel Gil Peyrot, Manuel Rubio, Florian Schmaus, Lance Stout, Sam Whited, Jonas Wielicki, Matthew Wild and one anonymous reviewer.</p>
</section1>
2016-12-02 10:15:30 -05:00
</xep>