You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0369.xml 171KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <?xml-stylesheet type="text/css" href="xmpp.css"?>
  8. <xep>
  9. <header>
  10. <title>Mediated Information eXchange (MIX)</title>
  11. <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>
  13. <number>0369</number>
  14. <status>Experimental</status>
  15. <type>Standards Track</type>
  16. <sig>Standards</sig>
  17. <approver>Council</approver>
  18. <dependencies>
  19. <spec>XMPP Core</spec>
  20. <spec>XMPP IM</spec>
  21. <spec>XEP-0004</spec>
  22. <spec>XEP-0030</spec>
  23. <spec>XEP-0054</spec>
  24. <spec>XEP-0060</spec>
  25. <spec>XEP-0084</spec>
  26. <spec>XEP-0128</spec>
  27. <spec>XEP-0198</spec>
  28. <spec>XEP-0292</spec>
  29. <spec>XEP-0297</spec>
  30. <spec>XEP-0313</spec>
  31. <spec>XEP-0372</spec>
  32. </dependencies>
  33. <supersedes/>
  34. <supersededby/>
  35. <shortname>MIX</shortname>
  36. &ksmithisode;
  37. &skille;
  38. &stpeter;
  39. <revision>
  40. <version>0.9.6</version>
  41. <date>2018-03-18</date>
  42. <initials>Editor (jwi)</initials>
  43. <remark><p>
  44. Fix typo errors with single quotes (marj). Editorial fixes (ralph)
  45. </p></remark>
  46. </revision>
  47. <revision>
  48. <version>0.9.5</version>
  49. <date>2018-01-08</date>
  50. <initials>sek</initials>
  51. <remark><p>
  52. Various Clarifications from Dave Cridland review:
  53. Remove Recommendation to do MIX/MUC on separate domains,
  54. Sort Default JID Visibility Preference,
  55. Make Owner optional,
  56. Clarify that Nick is optional;
  57. </p></remark>
  58. </revision> <revision>
  59. <version>0.9.4</version>
  60. <date>2018-01-02</date>
  61. <initials>sek</initials>
  62. <remark><p>
  63. Various Clarifications from Georg Lukas review:
  64. Role Membership reword,
  65. Participant's Node Joining clarification,
  66. Joining Channel Clarification,
  67. Coming online clarification,
  68. Going offline JID error,
  69. Allow servers to limit retract time frame,
  70. Clarify that private messages must not be groupchat,
  71. Creating Channel Clarification,
  72. Address security concerns on Converting a 1:1 Conversation to a Channel,
  73. Remove requirement for all user clients to support MIX,
  74. Change Retract to use MAM-ID;
  75. Ensure use of .example throughout (follow RFC conventions);
  76. </p></remark>
  77. </revision>
  78. <revision>
  79. <version>0.9.3</version>
  80. <date>2017-07-18</date>
  81. <initials>sek</initials>
  82. <remark><p>
  83. Remove Legacy MIX Namespace;
  84. Add mix element in message to hold MIX additional information;
  85. Roster Update Clarifications;
  86. Clarify when messages are delivered to clients;
  87. Extend Roster Get to select format;
  88. Ensure that text defining attributes and elements reference the namespace;
  89. Change mix_nick_register to nick-register;
  90. Separate namespace for roster information;
  91. rename jidmap2 to jidmap-visible;
  92. Namespace bump to mix:1;
  93. Correct from in response of join/leave IQs;
  94. Add capability for MIX in client's server;
  95. </p></remark>
  96. </revision>
  97. <revision>
  98. <version>0.9.2</version>
  99. <date>2017-04-03</date>
  100. <initials>sek</initials>
  101. <remark><p>
  102. Fix xmpp:nodes typos;
  103. Remove namespace references in Info/Config nodes;
  104. Modify Participant and JID Map syntaxes;
  105. Clarifications on subscription to participants node and using this to receive Nick changes;
  106. Replace use of "query" as MIX defined operations for setting nick;
  107. </p></remark>
  108. </revision>
  109. <revision>
  110. <version>0.9.1</version>
  111. <date>2017-03-29</date>
  112. <initials>sek</initials>
  113. <remark><p>
  114. Editorial Changes (addressing comments from Timothée Jaussoin);
  115. </p></remark>
  116. </revision>
  117. <revision>
  118. <version>0.9</version>
  119. <date>2017-03-22</date>
  120. <initials>sek</initials>
  121. <remark><p>
  122. Editorial Changes (mainly from Georg Lukas);
  123. Change to new syntax for proxy JIDs;
  124. Clarify MAM archive on Send;
  125. Extend to sort Selected JID visibility;
  126. Add examples of lookup read JID from proxy JID;
  127. </p></remark>
  128. </revision>
  129. <revision>
  130. <version>0.8.2</version>
  131. <date>2017-03-3</date>
  132. <initials>sek</initials>
  133. <remark><p>
  134. Make example ids pseudo-random;
  135. Shorten the example BIND2 resources;
  136. Fix Disco features to not use second namespace;
  137. Correct encoding of jid-multi;
  138. MAM intro clarification;
  139. Always add to roster, with direction of roster controlled by share preference;
  140. </p></remark>
  141. </revision>
  142. <revision>
  143. <version>0.8.1</version>
  144. <date>2017-02-20</date>
  145. <initials>sek</initials>
  146. <remark><p>
  147. Editorial Updates;
  148. Clarify Access to MAM history, prior to user joining channel;
  149. Add option for user to join without presence;
  150. Check invitee supports MIX;
  151. </p></remark>
  152. </revision>
  153. <revision>
  154. <version>0.8</version>
  155. <date>2017-02-13</date>
  156. <initials>sek</initials>
  157. <remark><p>
  158. Update after Brussels Summit;
  159. Remove Explicit Client Activation and replace with client capability discovery (summit 3);
  160. Limit Indirect to Join/Leave;
  161. Clarify Server use of Disco of Client;
  162. Add MIX capability information to Roster (summit 10);
  163. MIX as Core Spec (summit 1);
  164. Clarifications of password control, voice and name/description (summit 4/5/6)
  165. Removal of Subject and reference future Sticky Messages XEP (summit 7);
  166. Use example JIDs aligned to anticipated BIND2 specification;
  167. Clarify PubSub Node Type;
  168. Add Error handling section;
  169. Substantial Editorial Review;
  170. </p></remark>
  171. </revision>
  172. <revision>
  173. <version>0.7.1</version>
  174. <date>2017-01-30</date>
  175. <initials>sek</initials>
  176. <remark><p>
  177. Ensure all RFC 2119 keywords are capitalized and used correctly;
  178. Use MAM ID to identify message;
  179. Clarify use of the various channel names;
  180. Require all client operations to be direct or indirect (choice is just confusing);
  181. Add description of implicit activation ;
  182. MIX Domains must not contain users;
  183. Clarification on identifying channels in rosters;
  184. </p></remark>
  185. </revision>
  186. <revision>
  187. <version>0.7</version>
  188. <date>2017-01-27</date>
  189. <initials>sek</initials>
  190. <remark><p>
  191. Correct multi-language subject setting;
  192. Remove MIX Proxy terminology and replace with Participant Server Behaviour;
  193. </p></remark>
  194. </revision>
  195. <revision>
  196. <version>0.6.5</version>
  197. <date>2017-01-10</date>
  198. <initials>sek</initials>
  199. <remark><p>
  200. Modify MIX Proxy so that client sends to bare JID
  201. </p></remark>
  202. </revision>
  203. <revision>
  204. <version>0.6.4</version>
  205. <date>2017-01-10</date>
  206. <initials>sek</initials>
  207. <remark><p>
  208. Add node='mix' to channel disco to facilitate MIX and MUC co-existence on same node;
  209. Return Proxy JID on Join;
  210. Adjustment to message reflection
  211. </p></remark>
  212. </revision>
  213. <revision>
  214. <version>0.6.3</version>
  215. <date>2016-12-22</date>
  216. <initials>sek</initials>
  217. <remark><p>
  218. Add Update and Distribution to Table 3;
  219. Correct from in messages from channel;
  220. Use XEP-0297 in message forwarding;
  221. Update Dependent XEPs
  222. </p></remark>
  223. </revision>
  224. <revision>
  225. <version>0.6.2</version>
  226. <date>2016-12-21</date>
  227. <initials>sek</initials>
  228. <remark><p>
  229. Editorial Changes (Georg Lukas Review);
  230. Improve 1:1 Conversion;
  231. Sort out MIX Proxy and Presence Update
  232. </p></remark>
  233. </revision>
  234. <revision>
  235. <version>0.6.1</version>
  236. <date>2016-12-05</date>
  237. <initials>sek</initials>
  238. <remark><p>
  239. Clarify Direct PubSub access to each node type.
  240. </p></remark>
  241. </revision>
  242. <revision>
  243. <version>0.6</version>
  244. <date>2016-12-02</date>
  245. <initials>sek (XEP Editor: ssw)</initials>
  246. <remark><p>
  247. Added Internationalization Consideration section, and various I18n edits;
  248. Added Security Considerations section;
  249. Tombstoning of Redaction changes made optional;
  250. Added a section specifying MIX Proxy;
  251. Change configuration and information node management to directly use PubSub;
  252. Provide for XEP-0202 (vCard4 over XMPP) in addition to vcard-temp support.
  253. </p></remark>
  254. </revision>
  255. <revision>
  256. <version>0.5</version>
  257. <date>2016-11-04</date>
  258. <initials>sek (XEP Editor: ssw)</initials>
  259. <remark><p>
  260. Complete and restructure Administration Section: Creating Channels and modifying configuration;
  261. Add avatar nodes;
  262. Add section on roster handling;
  263. Discovering MIX Services;
  264. Resolve questions on future capabilities;
  265. Administration of Allowed/Banned; clarify Kick functionality is replaced;
  266. User Presence Probes on Channel Start-up;
  267. Add user Presence preference;
  268. Clarify and Expand MAM Archiving;
  269. Sort Retraction;
  270. Add Marker IQ;
  271. Conversion 1:1
  272. </p></remark>
  273. </revision>
  274. <revision>
  275. <version>0.4</version>
  276. <date>2016-09-21</date>
  277. <initials>sek</initials>
  278. <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>
  279. </revision>
  280. <revision>
  281. <version>0.3.1</version>
  282. <date>2016-09-07</date>
  283. <initials>sek</initials>
  284. <remark><p>Introduce MIX Proxy concept. Add MIX capability in client discovery.</p></remark>
  285. </revision>
  286. <revision>
  287. <version>0.3</version>
  288. <date>2016-09-05</date>
  289. <initials>sek</initials>
  290. <remark><p>Addressing comments from review of 0.2 and expansion/clarification of MUC/MIX dual working</p></remark>
  291. </revision>
  292. <revision>
  293. <version>0.2.3</version>
  294. <date>2016-09-01</date>
  295. <initials>ssw, ks</initials>
  296. <remark><p>Cleanup, use precis nickname for nicknames, and allow multiple subject languages.</p></remark>
  297. </revision>
  298. <revision>
  299. <version>0.2.2</version>
  300. <date>2016-08-26</date>
  301. <initials>ssw</initials>
  302. <remark><p>Phrasing and grammar.</p></remark>
  303. </revision>
  304. <revision>
  305. <version>0.2.1</version>
  306. <date>2016-08-25</date>
  307. <initials>sek, egp</initials>
  308. <remark><p>Includes Link Mauve (Emmanuel Gil PEYROT) editorial changes</p></remark>
  309. </revision>
  310. <revision>
  311. <version>0.2</version>
  312. <date>2016-08-16</date>
  313. <initials>sek, ks</initials>
  314. <remark><p>Significant update based on XMPP Summit discussions</p></remark>
  315. </revision>
  316. <revision>
  317. <version>0.1.1</version>
  318. <date>2016-03-17</date>
  319. <initials>XEP Editor (ssw)</initials>
  320. <remark><p>Fix XML in join example.</p></remark>
  321. </revision>
  322. <revision>
  323. <version>0.1</version>
  324. <date>2016-01-07</date>
  325. <initials>XEP Editor (asw)</initials>
  326. <remark><p>Initial published version approved by the XMPP Council.</p></remark>
  327. </revision>
  328. <revision>
  329. <version>0.0.1</version>
  330. <date>2015-10-12</date>
  331. <initials>kis/psa</initials>
  332. <remark><p>First draft.</p></remark>
  333. </revision>
  334. </header>
  335. <section1 topic='Introduction' anchor='intro'>
  336. <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>
  337. <p>Several reasons exist for replacing MUC:</p>
  338. <ul>
  339. <li>A number of use cases for group communication have emerged since MUC was first published.</li>
  340. <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>
  341. <li>It is impractical to address a number of the requirements listed in the next section with MUC or with extensions to MUC. </li>
  342. <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>
  343. </ul>
  344. <p>Because it is anticipated that there will be significant co-existence between MUC and MIX, this specification is designed so that:</p>
  345. <ul>
  346. <li>XMPP clients can implement MUC and this specification in a way that provides a coherent user experience.</li>
  347. <li>XMPP servers can implement this specification and also provide a MUC interface in order to support clients that only implement MUC.</li>
  348. </ul>
  349. <p>This specification gives guidance on supporting both MUC and MIX representations of chatrooms.</p>
  350. </section1>
  351. <section1 topic='Requirements' anchor='reqs'>
  352. <p>The following requirements have been identified, which MIX aims to address.</p>
  353. <ol>
  354. <li>A user's participation in a channel persists and is not modified by the user's client going online and offline.</li>
  355. <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>
  356. <li>Channels are NOT REQUIRED to support or reflect presence for participants.</li>
  357. <li>A reconnecting client can quickly resync with respect to messages and presence.</li>
  358. <li>A user MAY (subject to configuration) receive messages from a channel as an invisible observer.</li>
  359. <li>Configuration can be observed externally to the channel (e.g., list of participants, access control rights, etc.).</li>
  360. <li>MIX services SHOULD provide mechanisms to prevent JIDs from being harvested.</li>
  361. <li>MIX and Message Archive Management (MAM) MUST work well together.</li>
  362. <li>A user can determine which channels they participate in.</li>
  363. <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>
  364. <li>Enable federation of a channel across multiple servers, to provide a service equivalent to "federated MUC" &xep0289;.</li>
  365. <li>Enable sharing of messages on a channel without requiring sharing of presence.</li>
  366. <li>Enable sharing of presence without requiring message sending.</li>
  367. <li>(Desirable) Make it easier to reduce duplicate traffic.</li>
  368. </ol>
  369. </section1>
  370. <section1 topic='Concepts' anchor='concepts'>
  371. <section2 topic="Specification Appproach" anchor="concepts-approach">
  372. <p>
  373. MIX will enable a wide range of auxiliary services. The goal of the MIX specification is to set out the core capabilities needed for MIX. It is anticipated that additional XEPs will be written to extend the core MIX, and the core MIX specification notes some areas where this may happen. This approach will avoid the core MIX specification becoming unduly large. Profiles referencing sets of related MIX XEPs may be developed in the future.
  374. </p>
  375. </section2>
  376. <section2 topic="Core Concepts" anchor="concepts-core">
  377. <p>The following concepts underlie the design of MIX.</p>
  378. <ol>
  379. <li>MIX channels (roughly equivalent to MUC rooms) are hosted on one or more MIX domains, (examples: ''; ''; ''), which are discoverable through &xep0030;. Each channel on a MIX service can then be discovered and queried.</li>
  380. <li> In MIX each channel (e.g., '') is a specialized pubsub service. This is based on the model from &xep0163; where every user JID (e.g., '') is its own pubsub service. </li>
  381. <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>
  382. <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.
  383. </li>
  384. <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>
  385. <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>
  386. <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>
  387. <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>
  388. <li>Presence is sent to participants using bare JID, whether or not the user has an online client. </li>
  389. <li>Online clients MAY register presence, which is then shared with participants who have subscribed to presence.</li>
  390. <li>MIX decouples addressing of channel participants from their nicknames, so that nickname changes do not affect addressing.</li>
  391. <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>
  392. <li> Although some protocol is shared with MUC, MUC clients are not interoperable with a MIX service. </li>
  393. <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>
  394. <li>MIX domains MUST NOT be used to host end user JIDs. </li>
  395. </ol>
  396. </section2>
  397. <section2 topic="MIX and PubSub" anchor="concepts-pubsub">
  398. <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>
  399. <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.
  400. </p>
  401. </section2>
  402. <section2 topic="MIX and MAM" anchor="concepts-mam">
  403. <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>
  404. </section2>
  405. <section2 topic="Behaviour of MIX Participant's Server" anchor="concepts-mix-participant-server">
  406. <p>
  407. A MIX channel does not send messages and presence directly to the MIX client of a channel participant, but addresses them to the participant using the participant's bare JID. The participant's server MUST then handle these messages and pass them on to zero, one or multiple clients. To enable MIX to work, this behaviour is necessary and so the server of every MIX client MUST follow the rules set out in this specification.
  408. This approach enables flexible support of multiple clients for a MIX channel participant.
  409. The MIX model is that a user will join a channel over an extended period, and that the user (not a specific client used by the user) joins the channel. The primary subscription is with the client's bare JID.
  410. There are a number of MIX requirements on behaviour of the MIX Participant's server, which are summarized here:
  411. </p>
  412. <ol>
  413. <li>Messages from a MIX client to a MIX channel will go direct to the MIX service. They are relayed, but not modified, by the participant's server.</li>
  414. <li>Messages from a MIX channel to a MIX client are always sent to the MIX participant's server (addressed by bare JID) and MUST be handled by the MIX participant's server.</li>
  415. <li>All MIX messages received by the MIX participant's server for a participant MUST be stored using MAM in the participant's archive.</li>
  416. <li>The MIX participant's server will only forward messages to online clients and will not forward messages if no clients are online.
  417. This means that a MIX client needs to resynchronize with all MIX channels when it comes online. This message synchronization will happen between the MIX client and the MAM archive held on the MIX participant's server.</li>
  418. <li>The MIX client will generally send management and other messages directly to the MIX channel and this MUST be done except where specifically noted. </li>
  419. <li>The user's roster contains each MIX channel to which the user is subscribed. To achieve this the user's server needs to manage the roster on behalf of the user. For this reason, MIX join and leave commands MUST be sent by a client to the user's server. This enables the user's server to correctly manage the roster on behalf of the user.</li>
  420. </ol>
  421. <p>
  422. Messages from a MIX channel to a MIX participant (which will be of type=groupchat) and presence information are sent to the participant's server using the participant's bare JID. This means that the MIX participant's server MUST implement a modification of the standard &rfc6121; message processing rules.
  423. </p>
  424. <p>
  425. The core MIX specification sets out how the MIX channel interacts directly with XMPP clients and with the MIX participant's server. Behaviour of the MIX participant's server is also specified in this MIX specification.
  426. </p>
  427. </section2>
  428. <section2 topic="User Presence in MIX" anchor="concepts-presence">
  429. <p>
  430. MIX channels store presence of each online client for a user that chooses to publish presence. Presence is stored in the presence node and is encoded using a full proxy JID. Where a user publishes presence for one or more clients, this information is available to all users subscribing to the channel presence.
  431. </p>
  432. <p>
  433. Channel participants can send messages to clients publishing their presence by sending them to the full proxy JID published in the presence node. These stanzas MAY be routed to the client by the MIX channel. The choice to do this is dependent on MIX channel policy. For example, a disco request MAY be routed through the MIX channel to the client.
  434. </p>
  435. <p>
  436. Presence updates are distributed by a channel to the bare JID of subscribers and then the subscriber's server will distribute to each of the subscriber's currently online clients.
  437. </p>
  438. </section2>
  439. <section2 topic="Private Messages" anchor="concepts-pm">
  440. <p>
  441. Private messages MAY be sent to channel participants if allowed by channel policy. Private messages are
  442. addressed to the user's bare proxy JID determined from the participants node, and routed by the MIX to the user's bare real JID, where standard distribution rules will apply.
  443. </p>
  444. </section2>
  445. <section2 topic="Proxy JIDs and JID Visibility" anchor="proxy-jid">
  446. <p>
  447. MIX channels have three modes controlling JID visibility:
  448. </p>
  449. <table caption="JID Visibility Modes">
  450. <tr><th>Mode</th><th>Description</th></tr>
  451. <tr><td>'JID Visible'</td><td>In these channels all participant JIDs are visible to all channel participants.</td></tr>
  452. <tr><td>'JID Maybe Visible'</td><td>In these channels, participant JIDs are visible to all channel participants when participant preference allows.</td></tr>
  453. <tr><td>'JID&nbsp;Hidden'</td><td>In these channels, no participant JIDs are visible to channel participants, but they are visible to channel administrators.</td></tr>
  454. </table>
  455. <p>
  456. A channel participant MAY specify a preference for JID visibility for the channel, with one of the following values:
  457. </p>
  458. <table caption="JID Visibility Preference Options">
  459. <tr><th>Preference</th><th>Description</th></tr>
  460. <tr><td>'Prefer Visible'</td><td>The users JID will be visible if the channel is JID Visible or JID Maybe Visible channels and hidden if the channel is JID Hidden. </td></tr>
  461. <tr><td>'Prefer Hidden'</td><td>The user's JID will be hidden if the channel is JID Maybe Visible and shown if the channel is JID Visible .</td></tr>
  462. <tr><td>'Enforce Hidden'</td><td>The user's JID will never be shown and the user will be removed from channel if channel mode is changed to JID Visible.</td></tr>
  463. <tr><td>'Enforce Visible'</td><td>The users JID will always be shown and the user will be removed from channel if mode is changed to 'JID Hidden'.</td></tr>
  464. </table>
  465. <p>
  466. The default value is 'Prefer Hidden'.
  467. </p>
  468. <p>
  469. 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 with the name of the channel 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'. The reason for the proxy JID is to support JID Hidden channels. Proxy JIDs are also used in JID Visible channels, for consistency and to enable switching of JID visibility. The "urn:xmpp:mix:nodes:jidmap" node maps from proxy JID to real JID. 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.
  470. </p>
  471. <p>
  472. 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.
  473. </p>
  474. <p>
  475. The example real full JIDs in this specification are aligned the anticipated new format that splits the resource into two parts. The first part is UUID that is a stable and fixed value for the client and is anticipated to be a fixed format which may well be UUID 4. The second part is server assigned and will vary with each session. A realistic JID with resource is: 'hag66@shakespeare.example/d104f6a7-97e9-477f-8947-e4a37691d7ee/7533375f2cd'. This specification uses examples of the style: 'hag66@shakespeare.example/UUID-a1j/7533' which are aligned to real resources, but more compact. CITATION TO BE ADDED. If the final specification differs from this, the examples will be updated.
  476. </p>
  477. <p>
  478. The full JIDs held in the presence nodes are anonymized using a similar mechanism. First the bare JID is mapped to a bare proxy JID, using the mapping held in the "urn:xmpp:mix:nodes:jidmap" node for the bare JID. Then the resource is replaced with a generated value. For example, 'hag66@shakespeare.example/UUID-a1j/7533' in the channel coven might have a proxy JID of '123456#coven@mix.shakespeare.example/789'. There is no client visible mapping of proxy full JIDs maintained as this is not needed. The MIX channel will need to maintain a mapping, to support directly addressing clients, such as for client to client disco#info queries. While an full proxy JID is held in the presence node, the mapping to real JID MUST NOT be changed. When adding a client to the presence node, the server MAY add the same anonymized JID as used before by that client, or it MAY create a different anonymized JID.
  479. </p>
  480. </section2>
  481. <section2 topic="Standard Nodes" anchor="concepts-nodes">
  482. <p>MIX defines a number standard nodes are as follows. Note that all nodes are OPTIONAL and that not every channel will necessarily use each node:</p>
  483. <table caption="Standard MIX Nodes">
  484. <tr><th>Name</th><th>Node</th><th>Description</th><th>Update</th><th>Distribution</th></tr>
  485. <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>
  486. <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>
  487. <tr><td>JID Map</td><td>'urn:xmpp:mix:nodes:jidmap'</td><td>For storing a list of bare proxy JIDs from the participants node with a 1:1 mapping to the corresponding real JIDs.</td><td>Automatic</td><td>PubSub</td></tr>
  488. <tr><td>JID Maybe Visible Map</td><td>'urn:xmpp:mix:nodes:jidmap-visible'</td><td>For storing a list of bare proxy JIDs from the participants node with a 1:1 mapping to the corresponding real JIDs for participants that choose to share real JIDs in a channel with JID Maybe Visible mode.</td><td>Automatic</td><td>PubSub</td></tr>
  489. <tr><td>Presence</td><td>'urn:xmpp:mix:nodes:presence'</td><td>For storing information about the availability status of online participants, which MAY include multiple clients for a single participant.</td><td>Presence</td><td>Presence</td></tr>
  490. <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>
  491. <tr><td>Allowed</td><td>'urn:xmpp:mix:nodes:allowed'</td><td>For storing JIDs that are allowed to be channel participants.</td><td>PubSub</td><td>PubSub</td></tr>
  492. <tr><td>Banned</td><td>'urn:xmpp:mix:nodes:banned'</td><td>For storing JIDs that are not allowed to be channel participants. </td><td>PubSub</td><td>PubSub</td></tr>
  493. <tr><td>Configuration</td><td>'urn:xmpp:mix:nodes:config'</td><td>For storing channel configuration. </td><td>PubSub</td><td>PubSub</td></tr>
  494. </table>
  495. <p>
  496. All of the standard nodes are OPTIONAL. A channel providing a service similar to MUC will typically use all of the standard nodes, but other channels MAY use any combination of these nodes.
  497. 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.
  498. </p>
  499. <p>
  500. MIX also makes use of two nodes for support of Avatars. These nodes and their use is defined in &xep0084;. These nodes MAY be created as part of a MIX channel, where it is desired to publish an avatar associated with the channel.
  501. </p>
  502. <table caption="MIX Nodes for Avatar Support">
  503. <tr><th>Name</th><th>Node</th><th>Description</th></tr>
  504. <tr><td>Avatar Data</td><td>'urn:xmpp:avatar:data'</td><td>For publishing an Avatar</td></tr>
  505. <tr><td>Avatar Metadata</td><td>'urn:xmpp:avatar:metadata'</td><td>For publishing Avatar metadata</td></tr>
  506. </table>
  507. <p>
  508. The structure of each of the standard nodes defined by MIX is now considered in more detail in the rest of this section, after explaining roles.
  509. </p>
  510. <section3 topic="Roles" anchor="roles">
  511. <p>
  512. There are a number of MIX roles for each channel, listed in the following table. Rights will be assigned to the various roles in the channel configuration node.
  513. </p>
  514. <table caption="Channel Roles">
  515. <tr><th>Role</th><th>Membership and Rights</th></tr>
  516. <tr><td>Owners</td><td>These are owners of the channel, as specified in the channel configuration node. Only owners are allowed to modify the channel configuration node.</td></tr>
  517. <tr><td>Administrators</td><td>Administrators are defined in the channel configuration node. Administrators have update rights to the Allowed Node and Banned Node, so they can control which users are allowed to participate in a channel. </td></tr>
  518. <tr><td>Participants</td><td>Participants are users listed by JID in the participants node.</td></tr>
  519. <tr><td>Allowed</td><td>Allowed is the set of JIDs that are participants or are allowed to become participants. A JID is allowed if it does not match an entry in the banned node and either it matches an entry in the allowed node or the allowed node is not present. </td></tr>
  520. <tr><td>Anyone</td><td>Any user, including users in the banned node.</td></tr>
  521. </table>
  522. <p>
  523. There MUST always be at least one Owner for a Channel. Owners, Administrators, Participants, and Allowed are optional and do not need to be set. Where no owner is explicitly set, it is anticipated that a server administrator will have owner rights. Rights are defined in a strictly hierarchical manner following the order of this table, so that for example Owners will always have rights that Administrators have.
  524. </p>
  525. </section3>
  526. <section3 topic="Node Archiving" anchor="node-archiving">
  527. <p>
  528. 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 specification. Archiving of other nodes is OPTIONAL.
  529. </p>
  530. </section3>
  531. <section3 topic="Messages Node" anchor="messages-node">
  532. <p>
  533. 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.
  534. </p>
  535. </section3>
  536. <section3 topic="Participants Node" anchor="participants-node">
  537. <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:1' 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.
  538. </p>
  539. <p>
  540. 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.
  541. </p>
  542. <p>
  543. 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.
  544. </p>
  545. <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>
  546. <example caption="Value of Participants Node"><![CDATA[
  547. <items node='urn:xmpp:mix:nodes:participants'>
  548. <item id='123456#coven@mix.shakespeare.example'>
  549. <participant xmlns='urn:xmpp:mix:1'>
  550. <nick>thirdwitch</nick>
  551. </participant>
  552. </item>
  553. </items>
  554. ]]></example>
  555. </section3>
  556. <section3 topic="JID Map Node" anchor="jid-map-node">
  557. <p>The JID Map node is used to associate a proxy bare JID to its corresponding real bare JID. It is a PubSub node with the 'node' attribute set to 'urn:xmpp:mix:nodes:jidmap'. The JID Map node MUST have one entry for each entry in the Participants node. This value is added when a user joins the channel and is removed when the user leaves the channel.
  558. Each item is identified by proxy bare JID, mapping to the real bare JID. This node is used to give administrator access to real JIDs and participant access to real JIDs in jid-visible channels. This node MUST NOT be modified directly using pubsub.
  559. In JID Visible channels, all participants MAY subscribe to this node. In JID Hidden and JID Maybe Visible channels, only administrators can subscribe. The JID Map node is a permanent node with one item per participant. Information is stored in a &lt;participant/&gt; element qualified by the 'urn:xmpp:mix:1' namespace. The real JID is stored in a &lt;jid/&gt; child element of the &lt;participant/&gt; element. </p>
  560. <example caption="Value of JID Map Node"><![CDATA[
  561. <items node='urn:xmpp:mix:nodes:jidmap'>
  562. <item id='123456#coven@mix.shakespeare.example'>
  563. <participant xmlns='urn:xmpp:mix:1'>
  564. <jid>hecate@mix.shakespeare.example</jid>
  565. </participant>
  566. </item>
  567. </items>
  568. ]]></example>
  569. </section3>
  570. <section3 topic="JID Maybe Visible Map Node" anchor="jid-map2-node">
  571. <p>The JID Maybe Visible Map node is a similar node to the JID Map node that is used in addition to the JID Map Node in JID Maybe Visible channels. It is a PubSub node with the 'node' attribute set to 'urn:xmpp:mix:nodes:jidmap-visible'. All participants may subscribe to and access this node. It uses the same encoding as JID Map node and all participant JIDs MUST be included. Where a participant's preference is to not share the JID, the encoded participant value is the proxy JID. This will enable a user looking up a JID to clearly determine that the user preference is to not share the JID and to clearly distinguish this case from an erroneous proxy JID.
  572. </p>
  573. </section3>
  574. <section3 topic="Presence Node" anchor="presence-node">
  575. <p>
  576. The presence node contains the presence value for clients belonging to participants that choose to publish presence to the channel. A MIX channel MAY require that all participants publish presence. Each item in the presence node is identified by the full proxy JID, and contains the current presence value for that JID. The presence is encoded in the same way as data that would be sent in a presence stanza using a &lt;presence/&gt; element qualified by the 'jabber:client' namespace. The full proxy JID is always used in this node. In MIX it is possible to have a 'presence-less channel' by not using this node. Access Control MAY be set to enforce that for each of the full JIDs in this list, the bare JID MUST be in the participants list.
  577. </p>
  578. <p>
  579. This node MAY be subscribed to by users and this subscription MUST use the user's bare JID. So presence of online clients is sent to the user's server for each user subscribed to this node. Presence is always sent using standard presence protocol and NOT using pubsub protocol. Clients MUST NOT directly access the presence node using pubsub. The Presence node is a permanent PubSub node.
  580. </p>
  581. <example caption="Value of Presence Node"><![CDATA[
  582. <items node='urn:xmpp:mix:nodes:presence'>
  583. <item id='123456#coven@mix.shakespeare.example/8765'>
  584. <presence xmlns='jabber:client'>
  585. <show>dnd</show>
  586. <status>Making a Brew</status>
  587. </presence>
  588. </item>
  589. </items>
  590. ]]></example>
  591. </section3>
  592. <section3 topic="Information Node" anchor="info-node">
  593. <p>The Information node holds information about the channel. The information node contains a single item with the current information.
  594. 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:
  595. </p>
  596. <table caption="Information Node Attributes">
  597. <tr><th>Name</th><th>Description</th><th>Field Type</th><th>Values</th><th>Default</th></tr>
  598. <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>
  599. <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>
  600. <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>
  601. <tr><td>'JID Visibility'</td><td>Specified JID visibility of the channel.</td><td>list-single</td><td>'jid-hidden'; 'jid-maybe-visible'; 'jid-visible'</td><td>'jid-hidden'</td></tr>
  602. </table>
  603. <p>
  604. Name and Description of the channel apply to the whole channel and will usually be changed infrequently.
  605. </p>
  606. <p>
  607. 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.
  608. </p>
  609. <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.
  610. The following example shows the format of a item in the information node for the example coven@mix.shakespeare.example channel.
  611. </p>
  612. <example caption="Information Node"><![CDATA[
  613. <items node='urn:xmpp:mix:nodes:info'>
  614. <item id='2016-05-30T09:00:00'>
  615. <x xmlns='jabber:x:data' type='result'>
  616. <field var='FORM_TYPE' type='hidden'>
  617. <value>urn:xmpp:mix:1</value>
  618. </field>
  619. <field var='Name'>
  620. <value>Witches Coven</value>
  621. </field>
  622. <field var='Description'>
  623. <value>A location not far from the blasted heath where
  624. the three witches meet</value>
  625. </field>
  626. <field var='Contact'>
  627. <value>greymalkin@shakespeare.example</value>
  628. </field>
  629. <field var='JID Visibility'>
  630. <value>jid-visible</value>
  631. </field>
  632. </x>
  633. </item>
  634. </items>
  635. ]]></example>
  636. </section3>
  637. <section3 topic="Allowed" anchor="allowed-node">
  638. <p>
  639. This node represents a list of JIDs that are allowed to become participants. If the Allowed node is not present, all JIDs are allowed. This node is accessed and managed using standard pubsub. The Allowed list is always considered in conjunction with the banned list, stored in the banned node. Only Administrators and Owners have write permission to the Allowed node and are also the only roles that are allowed to subscribe to this node. The Allowed node is a permanent node. Each item contains a real bare JID. The following example shows how the Allowed list can specify single JIDs and domains.
  640. </p>
  641. <example caption="Allowed Node"><![CDATA[
  642. <items node='urn:xmpp:mix:nodes:allowed'>
  643. <item id='shakespeare.example'/>
  644. <item id='alice@wonderland.example'/>
  645. </items>
  646. ]]></example>
  647. </section3>
  648. <section3 topic="Banned" anchor="banned-node">
  649. <p>
  650. This node represents a list of JIDs that are explicitly not allowed to become participants. The values in this list take priority over values in the Allowed node. This node is accessed and managed using standard pubsub Only Administrators and Owners have write permission to the Banned node and are also the only roles that are allowed to subscribe to this node. Each item contains a real bare JID. The Banned node can contain bare JIDs and/or domains. The Banned node is a permanent node.
  651. </p>
  652. <example caption="Banned Node"><![CDATA[
  653. <items node='urn:xmpp:mix:nodes:banned'>
  654. <item id='lear@shakespeare.example'/>
  655. <item id='macbeth@shakespeare.example'/>
  656. </items>
  657. ]]></example>
  658. </section3>
  659. <section3 topic="Configuration Node" anchor="config-node">
  660. <p>
  661. The Configuration node holds the configuration of the channel as a single item, named by the date-time of the last update to the configuration. The Configuration node is a permanent node with a maximum of one item. Previous configuration history MAY be accessed by MAM. Users with read access to the configuration node MAY subscribe to the configuration node to get notification of configuration change. This node is accessed and managed using standard pubsub. The configuration node is OPTIONAL for a MIX channel. For example, configuration choices could be fixed and not exposed. A subset of the defined configuration options MAY be used and additional non-standard configuration options MAY be added. JIDs in the configuration MUST be real bare JIDs and not proxy JIDs. If configuration options to control functionality of the nature described here are provided, the options defined in this standard MUST be used. The following configuration attributes are defined:
  662. </p>
  663. <table caption="Configuration Node Attributes">
  664. <tr><th>Name</th><th>Description</th><th>Field Type</th><th>Values</th><th>Default</th></tr>
  665. <tr><td>'Last Change Made By'</td><td>Bare JID of the user making the last change.</td><td>jid-single</td><td>-</td><td>-</td></tr>
  666. <tr><td>'Owner'</td><td>Bare JIDs with Owner rights as defined in ACL node. When a channel is created, the JID creating the channel is configured as an owner, unless this attribute is explicitly configured to another value.</td><td>jid-multi</td><td>-</td><td>-</td></tr>
  667. <tr><td>'Administrator'</td><td>Bare JIDs with Administrator rights.</td><td>jid-multi</td><td>-</td><td>-</td></tr>
  668. <tr><td>'End of Life'</td><td>The date and time at which the channel will be automatically removed by the server. If this is not set, the channel is permanent.</td><td>text-single</td><td>-</td><td>-</td></tr>
  669. <tr><td>'Nodes Present'</td><td>Specifies which nodes are present. Presence of config nodes is implicit. Jidmap node MUST be present if participants node is present. 'avatar' means that both Avatar Data and Avatar Metadata nodes are present.</td><td>list-multi</td><td>'participants'; 'presence'; 'information'; 'allowed'; 'banned'; 'jidmap-visible'; 'avatar'</td><td>-</td></tr>
  670. <tr><td>'Messages Node Subscription'</td><td>Controls who can subscribe to messages node.</td><td>list-single</td><td>'participants'; 'allowed'; 'anyone'</td><td>'participants'</td></tr>
  671. <tr><td>'Presence Node Subscription'</td><td>Controls who can subscribe to presence node.</td><td>list-single</td><td>'participants'; 'allowed'; 'anyone'</td><td>'participants'</td></tr>
  672. <tr><td>'Participants Node Subscription'</td><td>Controls who can subscribe to participants node.</td><td>list-single</td><td>'participants'; 'allowed'; 'anyone'; 'nobody'; 'admins'; 'owners'</td><td>'participants'</td></tr>
  673. <tr><td>'Information Node Subscription'</td><td>Controls who can subscribe to the information node.</td><td>list-single</td><td>'participants'; 'allowed'; 'anyone'</td><td>'participants'</td></tr>
  674. <tr><td>'Allowed Node Subscription'</td><td>Controls who can subscribe to allowed node.</td><td>list-single</td><td>'participants'; 'allowed'; 'nobody'; 'admins'; 'owners' </td><td>'admins'</td></tr>
  675. <tr><td>'Banned Node Subscription'</td><td>Controls who can subscribe to banned node.</td><td>list-single</td><td>'participants'; 'allowed'; 'nobody'; 'admins'; 'owners' </td><td>'admins'</td></tr>
  676. <tr><td>'Configuration Node Access'</td><td>Controls who can subscribe to configuration node and who has read access to it.</td><td>list-single</td><td>'participants'; 'allowed'; 'nobody'; 'admins'; 'owners' </td><td>'owners'</td></tr>
  677. <tr><td>'Information Node Update Rights'</td><td>Controls who can make changes to the information node</td><td>list-single</td><td>'participants'; 'admins'; 'owners' </td><td>'admins'</td></tr>
  678. <tr><td>'Avatar Nodes Update Rights'</td><td>Controls who can make changes to the avatar data and metadata nodes</td><td>list-single</td><td>'participants'; 'admins'; 'owners' </td><td>'admins'</td></tr>
  679. <tr><td>'Open Presence'</td><td>If selected, any client MAY register presence. If not selected, only clients with bare JID in the participants list are allowed to register presence.</td><td>boolean</td><td>-</td><td>false</td></tr>
  680. <tr><td>'Participants Must Provide Presence'</td><td>If selected, all channel participants are REQUIRED to share presence information with the channel.</td><td>boolean</td><td>-</td><td>false</td></tr>
  681. <tr><td>'User Message Retraction'</td><td>If this option is selected users will be able to retract messages that they have sent to the MIX channel.</td><td>boolean</td><td>-</td><td>false</td></tr>
  682. <tr><td>'Administrator Message Retraction Rights'</td><td>This controls which group is able to retract any message sent to the MIX channel.</td><td>list-single</td><td>'nobody'; 'admins'; 'owners'</td><td>'owners'</td></tr>
  683. <tr><td>'Participation Addition by Invitation from Participant'</td><td>This option extends a channel so that a channel participant has rights to invite and enable other users as participants.</td><td>boolean</td><td>-</td><td>false</td></tr>
  684. <tr><td>'Private Messages'</td><td>If this option is selected, private messages MAY be used with the channel.</td><td>boolean</td><td>-</td><td>true</td></tr>
  685. </table>
  686. <p>
  687. The configuration node is in &xep0004; format and includes all of the options used by the channel, including values for options using default values. This means that the value in the form can be directly mapped with the form returned by configuration administration commands. Configuration nodes will typically have a large number of elements. The following short example is provided to illustrate the syntax of the configuration node.
  688. </p>
  689. <example caption="Configuration Node"><![CDATA[
  690. <items node='urn:xmpp:mix:nodes:config'>
  691. <item id='2016-05-30T09:00:00'>
  692. <x xmlns='jabber:x:data' type='result'>
  693. <field var='FORM_TYPE' type='hidden'>
  694. <value>urn:xmpp:mix:1</value>
  695. </field>
  696. <field var='Owner'>
  697. <value>hecate@shakespeare.example</value>
  698. <value>greymalkin@shakespeare.example</value>
  699. </field>
  700. <field var='Messages Node Subscription'>
  701. <value>allowed</value>
  702. </field>
  703. <field var='No Private Messages'>
  704. <value>true</value>
  705. </field>
  706. </x>
  707. </item>
  708. </items>
  709. ]]></example>
  710. </section3>
  711. </section2>
  712. <section2 topic="Non-Standard Nodes" anchor="non-standard-nodes">
  713. <p>
  714. 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.
  715. </p>
  716. </section2>
  717. </section1>
  718. <section1 topic="Error Handling" anchor="error-handling">
  719. <p>
  720. 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:
  721. </p>
  722. <ol>
  723. <li>IQ. All of the IQ errors of &rfc6120; MUST be supported.</li>
  724. <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>
  725. <li>Presence. Any responses to presence messages MUST follow the rules of &rfc6121;.</li>
  726. <li>PubSub. Where MIX protocol messages use PubSub protocol, the errors defined in &xep0060; MUST be used and supported.</li>
  727. </ol>
  728. </section1>
  729. <section1 topic='Discovery' anchor='discovery'>
  730. <section2 topic='Discovering a MIX service' anchor='disco-service'>
  731. <p>
  732. An entity MAY discover a MIX service or MIX services by sending a Service Discovery items ("disco#items") request to its own server.
  733. </p>
  734. <example caption="Entity queries Server for associated services" ><![CDATA[
  735. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  736. id='lx09df27'
  737. to='shakespeare.example'
  738. type='get'>
  739. <query xmlns=''/>
  740. </iq>
  741. <iq from='shakespeare.example'
  742. id='lx09df27'
  743. to='hag66@shakespeare.example/UUID-c8y/1573'
  744. type='result'>
  745. <query xmlns=''>
  746. <item jid='mix.shakespeare.example'
  747. name='Shakespearean Chat Service'/>
  748. <item jid='mix2.shakespeare.example'
  749. name='Another Shakespearean Chat Service'/>
  750. </query>
  751. </iq>
  752. ]]></example>
  753. <p>To determine if a domain hosts a MIX service, a &xep0030; info query is sent in the usual manner to determine capabilities.</p>
  754. <example caption="Entity queries a service" ><![CDATA[
  755. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  756. id='lx09df27'
  757. to='mix.shakespeare.example'
  758. type='get'>
  759. <query xmlns=''/>
  760. </iq>
  761. ]]></example>
  762. <p>The MIX service then MUST return its identity and the features it supports, which MUST include the 'urn:xmpp:mix:1' feature, and the identity MUST have a category of 'conference' and a type of 'text', as shown in the following example: </p>
  763. <example caption="Service responds with Disco Info result" ><![CDATA[
  764. <iq from='mix.shakespeare.example'
  765. id='lx09df27'
  766. to='hag66@shakespeare.example/UUID-c8y/1573'
  767. type='result'>
  768. <query xmlns=''>
  769. <identity
  770. category='conference'
  771. name='Shakespearean Chat Service'
  772. type='text'/>
  773. <feature var='urn:xmpp:mix:1'/>
  774. <feature var='urn:xmpp:mix:1#searchable'>
  775. </query>
  776. </iq>
  777. ]]></example>
  778. <p>
  779. A MIX service MUST return the 'urn:xmpp:mix:1' feature and MAY return the other features listed here:
  780. </p>
  781. <ul>
  782. <li>'urn:xmpp:mix:1': This indicates support of MIX, and is returned by all MIX services.</li>
  783. <li>'urn:xmpp:mix:1#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>
  784. <li>'urn:xmpp:mix:1#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>
  785. </ul>
  786. <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>
  787. </section2>
  788. <section2 topic='Discovering the Channels on a Service' anchor='disco-channel-list'>
  789. <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>
  790. <example caption='Client Queries for Channels on MIX Service'><![CDATA[
  791. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  792. id='kl2fax27'
  793. to='mix.shakespeare.example'
  794. type='get'>
  795. <query xmlns=''/>
  796. </iq>
  797. ]]></example>
  798. <example caption='MIX Service Returns Disco Items Result'><![CDATA[
  799. <iq from='mix.shakespeare.example'
  800. id='kl2fax27'
  801. to='hag66@shakespeare.example/UUID-c8y/1573'
  802. type='result'>
  803. <query xmlns=''>
  804. <item jid='coven@mix.shakespeare.example' />
  805. <item jid='spells@mix.shakespeare.example' />
  806. <item jid='wizards@mix.shakespeare.example' />
  807. </query>
  808. </iq>
  809. ]]></example>
  810. </section2>
  811. <section2 topic='Discovering Channel Information' anchor='disco-channel-info'>
  812. <p>In order to find out more information about a given channel, a user can send a disco#info query to the channel. </p>
  813. <example caption='Entity Queries for Information about a Specific Channel'><![CDATA[
  814. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  815. id='ik3vs715'
  816. to='coven@mix.shakespeare.example'
  817. type='get'>
  818. <query xmlns='' node='mix'/>
  819. </iq>
  820. ]]></example>
  821. <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>
  822. <example caption='Channel Returns Disco Info Result'><![CDATA[
  823. <iq from='coven@mix.shakespeare.example'
  824. id='ik3vs715'
  825. to='hag66@shakespeare.example/UUID-c8y/1573'
  826. type='result'>
  827. <query xmlns='' node='mix'>
  828. <identity
  829. category='conference'
  830. name='A Dark Cave'
  831. type='mix'/>
  832. <feature var='urn:xmpp:mix:1'/>
  833. <feature var='urn:xmpp:mam:1'/>
  834. </query>
  835. </iq>
  836. ]]></example>
  837. </section2>
  838. <section2 topic='Discovering Nodes at a Channel' anchor='disco-channel-nodes'>
  839. <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>
  840. <example caption='Entity Queries for Nodes at a Channel'><![CDATA[
  841. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  842. id='kl2fax27'
  843. to='coven@mix.shakespeare.example'
  844. type='get'>
  845. <query xmlns=''/ node='mix'>
  846. </iq>
  847. ]]></example>
  848. <example caption='Channel Returns Disco Items Result'><![CDATA[
  849. <iq from='coven@mix.shakespeare.example'
  850. id='kl2fax27'
  851. to='hag66@shakespeare.example/UUID-c8y/1573'
  852. type='result'>
  853. <query xmlns='' node='mix'>
  854. <item jid='coven@mix.shakespeare.example'
  855. node='urn:xmpp:mix:nodes:presence'/>
  856. <item jid='coven@mix.shakespeare.example'
  857. node='urn:xmpp:mix:nodes:participants'/>
  858. <item jid='coven@mix.shakespeare.example'
  859. node='urn:xmpp:mix:nodes:messages'/>
  860. <item jid='coven@mix.shakespeare.example'
  861. node='urn:xmpp:mix:nodes:config'/>
  862. </query>
  863. </iq>
  864. ]]></example>
  865. </section2>
  866. <section2 topic="Determining Information about a Channel" anchor="find-channel-info">
  867. <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>
  868. <example caption='Client Requests Channel Information'><![CDATA[
  869. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  870. id='kl2fax27'
  871. to='coven@mix.shakespeare.example'
  872. type='get'>
  873. <pubsub xlns=''>
  874. <items node='urn:xmpp:mix:nodes:info'/>
  875. </pubsub>
  876. </iq>
  877. ]]></example>
  878. <example caption='MIX Service Returns Channel Information'><![CDATA[
  879. <iq from='coven@mix.shakespeare.example'
  880. id='kl2fax27'
  881. to='hag66@shakespeare.example/UUID-c8y/1573'
  882. type='result'>
  883. <pubsub xlns=''>
  884. <items node='urn:xmpp:mix:nodes:info'>
  885. <item id='2016-05-30T09:00:00' xmlns='urn:xmpp:mix:1'>
  886. <x xmlns='jabber:x:data' type='result'>
  887. <field var='FORM_TYPE' type='hidden'>
  888. <value>urn:xmpp:mix:1</value>
  889. </field>
  890. <field var='Name'>
  891. <value>Witches Coven</value>
  892. </field>
  893. <field var='Description'>
  894. <value>A location not far from the blasted heath where
  895. the three witches meet</value>
  896. </field>
  897. <field var='Contact'>
  898. <value>greymalkin@shakespeare.example</value>
  899. </field>
  900. </x>
  901. </item>
  902. </items>
  903. </pubsub>
  904. </iq>
  905. ]]></example>
  906. </section2>
  907. <section2 topic='Determining the Participants in a Channel' anchor='find-channel-participants'>
  908. <p>
  909. Participants in the channel are determined using PubSub retrieval of the Participants Node which will give proxy JID and nick. </p>
  910. <example caption='User&apos;s Client Requests Participant List'><![CDATA[
  911. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  912. id='kl2fax27'
  913. to='coven@mix.shakespeare.example'
  914. type='get'>
  915. <pubsub xlns=''>
  916. <items node='urn:xmpp:mix:nodes:participants'/>
  917. </pubsub>
  918. </iq>
  919. ]]></example>
  920. <example caption='MIX Service Returns Participant List'><![CDATA[
  921. <iq from='coven@mix.shakespeare.example'
  922. id='kl2fax27'
  923. to='hag66@shakespeare.example/UUID-c8y/1573'
  924. type='result'>
  925. <pubsub xlns=''>
  926. <items node='urn:xmpp:mix:nodes:participants'>
  927. <item id='123456#coven@mix.shakespeare.example'>
  928. <participant xmlns='urn:xmpp:mix:1'>
  929. <nick>thirdwitch</nick>
  930. </participant>
  931. </item>
  932. <item id='87123#coven@mix.shakespeare.example'>
  933. <participant xmlns='urn:xmpp:mix:1'>
  934. <nick>top witch</nick>
  935. </participant>
  936. </item>
  937. </items>
  938. </pubsub>
  939. <items>
  940. </iq>
  941. ]]></example>
  942. <p>
  943. Online clients in the channel can be looked up in a similar manner by PubSub query of the Presence node.
  944. </p>
  945. </section2>
  946. <section2 topic="Discovering Client MIX Capability" anchor="mix-client-discovery">
  947. <p>
  948. 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.
  949. </p>
  950. <example caption='Disco Query for MIX support'><![CDATA[
  951. <iq from='juliet@capulet.example/UUID-e3r/9264'
  952. id='d1rt87mr4w'
  953. to='romeo@montague.example/UUID-m2t/3945'
  954. type='get'>
  955. <query xmlns=''/>
  956. </iq>
  957. <iq from='romeo@montague.example/UUID-m2t/3945'
  958. id='d1rt87mr4w'
  959. to='juliet@capulet.example/UUID-e3r/9264'
  960. type='result'>
  961. <query xmlns=''>
  962. <feature var=''/>
  963. <feature var=''/>
  964. <feature var=''/>
  965. <feature var=''/>
  966. <feature var='urn:xmpp:mix:1'/>
  967. </query>
  968. </iq>
  969. ]]></example>
  970. </section2>
  971. </section1>
  972. <section1 topic='Use Cases' anchor='usecases'>
  973. <section2 topic='Common User Use Cases' anchor='usecases-user'>
  974. <section3 topic='Joining a Channel' anchor='usecase-user-join'>
  975. <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. 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:1' 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.
  976. 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.
  977. </p>
  978. <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>
  979. <p>
  980. 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.
  981. 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.
  982. </p>
  983. <example caption="Client sends request to Local Server to Join a Channel"><![CDATA[
  984. <iq type='set'
  985. from='hag66@shakespeare.example/UUID-a1j/7533'
  986. to='hag66@shakespeare.example'
  987. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  988. <join xmlns='urn:xmpp:mix:1'
  989. channel='coven@mix.shakespeare.example'>
  990. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  991. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  992. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  993. <subscribe node='urn:xmpp:mix:nodes:config'/>
  994. </join>
  995. </iq>
  996. ]]></example>
  997. <p>
  998. The user’s server will then pass the request to the MIX channel, with the request coming from the user's bare JID.
  999. </p>
  1000. <example caption="User's Server sends Join request to MIX Channel"><![CDATA[
  1001. <iq type='set'
  1002. from='hag66@shakespeare.example'
  1003. to='coven@mix.shakespeare.example'
  1004. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1005. <join xmlns='urn:xmpp:mix:1'>
  1006. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1007. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  1008. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  1009. <subscribe node='urn:xmpp:mix:nodes:config'/>
  1010. </join>
  1011. </iq>
  1012. ]]></example>
  1013. <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>
  1014. <example caption="Channel responds to User's Server"><![CDATA[
  1015. <iq type='result'
  1016. from='coven@mix.shakespeare.example'
  1017. to='hag66@shakespeare.example'
  1018. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1019. <join xmlns='urn:xmpp:mix:1' jid='123456#coven@mix.shakespeare.example'>
  1020. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1021. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  1022. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  1023. <subscribe node='urn:xmpp:mix:nodes:config'/>
  1024. </join>
  1025. </iq>
  1026. ]]></example>
  1027. <p>
  1028. The user's server will then make roster modifications as set out in the next section.
  1029. 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:
  1030. </p>
  1031. <example caption="User's Server sends response to Client"><![CDATA[
  1032. <iq type='result'
  1033. from='hag66@shakespeare.example'
  1034. to='hag66@shakespeare.example/UUID-a1j/7533'
  1035. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1036. <join xmlns='urn:xmpp:mix:1' jid='123456#coven@mix.shakespeare.example'>
  1037. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1038. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  1039. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  1040. <subscribe node='urn:xmpp:mix:nodes:config'/>
  1041. </join>
  1042. </iq>
  1043. ]]></example>
  1044. <p>
  1045. This response informs the client that initiated the join request that the request has been completed. Note that the roster changes described in the next section 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.
  1046. </p>
  1047. <p>
  1048. 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>
  1049. <p>
  1050. The following response example shows a successful response to the initial request example where
  1051. 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.
  1052. </p>
  1053. <example caption="Channel Processes Join With Some Nodes Not Subscribed To"><![CDATA[
  1054. <iq type='result'
  1055. from='hag66@shakespeare.example'
  1056. to='coven@mix.shakespeare.example'
  1057. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1058. <join xmlns='urn:xmpp:mix:1' jid='123456#coven@mix.shakespeare.example'>
  1059. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1060. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  1061. <subscribe node='urn:xmpp:mix:nodes:info'/>
  1062. </join>
  1063. </iq>
  1064. ]]></example>
  1065. <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>
  1066. <example caption="Channel Adds User to Participants Node"><![CDATA[
  1067. <message from='coven@mix.shakespeare.example'
  1068. to='hecate@shakespeare.example'
  1069. id='5A9C7398-DB13-4BFA-A091-2D466C710AAF'>
  1070. <event xmlns=''>
  1071. <items node='urn:xmpp:mix:nodes:participants'>
  1072. <item id='123456#coven@mix.shakespeare.example'>
  1073. <participant xmlns='urn:xmpp:mix:1'/>
  1074. </item>
  1075. </items>
  1076. </event>
  1077. </message>
  1078. ]]></example>
  1079. <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>
  1080. <p>
  1081. 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.
  1082. </p>
  1083. <p>
  1084. 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:1' 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.
  1085. </p>
  1086. <example caption="User Modifies Subscription Request"><![CDATA[
  1087. <iq type='set'
  1088. from='hag66@shakespeare.example/UUID-a1j/7533'
  1089. to='coven@mix.shakespeare.example'
  1090. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1091. <update-subscription xmlns='urn:xmpp:mix:1'>
  1092. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1093. </update-subscription>
  1094. </iq>
  1095. <iq type='result'
  1096. from='coven@mix.shakespeare.example'
  1097. to='hag66@shakespeare.example/UUID-a1j/7533'
  1098. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1099. <update-subscription xmlns='urn:xmpp:mix:1' jid='hag66@shakespeare.example'>
  1100. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1101. </update-subscription>
  1102. </iq>
  1103. ]]></example>
  1104. </section3>
  1105. <section3 topic="Roster Management" anchor="usecase-roster-management">
  1106. <p>
  1107. As part of the channel joining process, the user's server MUST add the MIX channel to the user's roster. This is done to share the user's presence status with the channel and channel participants subscribing to presence, when the user wishes this presence to be shared. These roster entries also enables the user's client to quickly determine which channels the user has joined.
  1108. This roster entry will lead to the user's server correctly sending user's presence from all the user's MIX clients to the MIX channel. Where the user wishes to share presence, the roster subscription is configured with one way presence, as presence is sent to the MIX channel but no presence information is sent about the MIX channel to the user.
  1109. </p>
  1110. <p>
  1111. If the user does not wish to publish presence information to the channel, the user's server will add the roster entry with mode subscription=none. The roster entry will be present to record that the user has joined the channel, but it will not send presence information to the channel. The user's server MUST do this when the user has chosen Presence preference of 'not share' as described below. If the user changes the value of the preference, the server MUST modify subscription mode to reflect this.
  1112. </p>
  1113. <p>
  1114. The user's server MUST remove this roster entry when the user leaves the channel.
  1115. </p>
  1116. <p>
  1117. A channel MAY publish an Avatar following &xep0084;. A client MAY make use of this information to associate an Avatar with the roster entry for a channel.
  1118. </p>
  1119. </section3>
  1120. <section3 topic="User Preferences and Additional Information" anchor="usecase-visibilty-pref">
  1121. <p>A channel MAY store user preferences and parameters with each user. A user JID visibility preference has the following values:
  1122. </p>
  1123. <ol>
  1124. <li>'default'. In this setting, the channel default value will be used. This value is used if another value is not explicitly set. This means JID is visible for a JID Visible channel and JID is hidden for JID Hidden and JID Maybe Visible channels.</li>
  1125. <li>'never'. If this is set, JID will never be shared and user will be removed from the channel if its mode changes to JID Visible.</li>
  1126. <li>'always'. If this is set, JID will always be shared and users will be removed from the channel if its mode changes to JID Hidden.</li>
  1127. <li>'prefer not'. If this is set, JID will only be shared if mode is JID Visible.</li>
  1128. </ol>
  1129. <p>
  1130. The user MAY specify that no Private Messages are to be sent from the channel, and allow vCard retrieval.
  1131. </p>
  1132. <p>
  1133. The user MAY specify that presence is not to be shared, which will prevent the MIX Channel from sending a presence probe for the user on channel start-up. The user will also choose to not include the MIX channel in the user's roster, so that presence will not be updated. Where the channel configuration sets 'Participants Must Provide Presence', this variable MUST be set to 'Share'.
  1134. </p>
  1135. <p>
  1136. The following table sets out the standardized user preference values. A MIX implementation MAY use other values.
  1137. </p>
  1138. <table caption="Standard User Preference Options">
  1139. <tr><th>Option</th> <th>Values</th><th>Default</th></tr>
  1140. <tr><td>'JID Visibility'</td> <td>'default', 'never', 'always', 'prefer not'</td> <td>'default'</td></tr>
  1141. <tr><td>'Private Messages'</td><td>'allow', 'block'</td> <td>'allow'</td></tr>
  1142. <tr><td>'vCard'</td><td>'allow', 'block'</td> <td>'block'</td></tr>
  1143. <tr><td>'Presence'</td><td>'share', 'not share'</td><td>'share'</td></tr>
  1144. </table>
  1145. <p>When joining a channel, the client MAY specify one or more preference options as a &xep0004; form. In the response, the server MUST specify all of the user preferences supported by the server, with default values if the user has not requested a different value. The following example shows joining a channel and setting a preference. The following example shows the message sent from the user's server to the MIX channel, which will have been preceded by a message from the user's client to the user's server.</p>
  1146. <example caption="User Joins a Channel and Specifies a preference"><![CDATA[
  1147. <iq type='set'
  1148. from='hag66@shakespeare.example'
  1149. to='coven@mix.shakespeare.example'
  1150. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1151. <join xmlns='urn:xmpp:mix:1'>
  1152. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1153. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  1154. <x xmlns='jabber:x:data' type='submit'>
  1155. <field var='FORM_TYPE' type='hidden'>
  1156. <value>urn:xmpp:mix:1</value>
  1157. </field>
  1158. <field var='JID Visibility'>
  1159. <value>never</value>
  1160. </field>
  1161. </x>
  1162. </join>
  1163. </iq>
  1164. ]]></example>
  1165. <p>The following example shows the result of a successful join, which also reports all the user preferences. This example shows the message coming from the MIX channel to the user's server, which will be sent on to the user.</p>
  1166. <example caption="Channel Successfully Processes Join and returns the preferences set"><![CDATA[
  1167. <iq type='result'
  1168. from='coven@mix.shakespeare.example'
  1169. to='hag66@shakespeare.example'
  1170. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1171. <join xmlns='urn:xmpp:mix:1' jid='hag66@shakespeare.example'>
  1172. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1173. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  1174. <x xmlns='jabber:x:data' type='result'>
  1175. <field var='FORM_TYPE' type='hidden'>
  1176. <value>urn:xmpp:mix:1</value>
  1177. </field>
  1178. <field var='JID Visibility'>
  1179. <value>never</value>
  1180. </field>
  1181. <field var='Private Messages'>
  1182. <value>allow</value>
  1183. </field>
  1184. <field var='vCard'>
  1185. <value>block</value>
  1186. </field>
  1187. </x>
  1188. </join>
  1189. </iq>
  1190. ]]></example>
  1191. <p>The client MAY also query the channel in order to find out which user preferences are supported and the options available. This will allow users to set options not specified in the standard, by providing a form template in the result. The request is encoded as a &lt;user-preference/&gt; child element of &lt;iq/&gt;. &lt;user-preference/&gt; is qualified by the 'urn:xmpp:mix:1' namespace. The result is encoded as a form child element in the &lt;user-preference/&gt; element.</p>
  1192. <example caption="User Requests and Recieves Preferences Template Form"><![CDATA[
  1193. <iq type='get'
  1194. from='hag66@shakespeare.example/UUID-a1j/7533'
  1195. to='coven@mix.shakespeare.example'
  1196. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1197. <user-preference xmlns='urn:xmpp:mix:1'/>
  1198. </iq>
  1199. <iq type='result'
  1200. from='coven@mix.shakespeare.example'
  1201. to='hag66@shakespeare.example/UUID-a1j/7533'
  1202. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1203. <user-preference xmlns='urn:xmpp:mix:1'>
  1204. <x xmlns='jabber:x:data' type='form'>
  1205. <field var='FORM_TYPE' type='hidden'>
  1206. <value>urn:xmpp:mix:1</value>
  1207. </field>
  1208. <field type='list-single' label='Preference for JID Visibility'
  1209. var='JID Visibility'>
  1210. <option label='JID Never Shown'><value>Never</value></option>
  1211. <option label='Default Behaviour'>
  1212. <value>default</value></option>
  1213. <option label='Try not to show JID'>
  1214. <value>prefer not</value></option>
  1215. </field>
  1216. <field type='list-single' label='Example Custom Preference'
  1217. var='Custom Preference'>
  1218. <option label='One Option'><value>a</value></option>
  1219. <option label='Another Option'><value>b</value></option>
  1220. </field>
  1221. </x>
  1222. </user-preference>
  1223. </iq>
  1224. ]]></example>
  1225. <p>
  1226. A user MAY modify preferences using the corresponding set operation. The set MAY specify values for some or all attributes. All attributes are returned in the result.
  1227. </p>
  1228. <example caption="User Updates Preferences"><![CDATA[
  1229. <iq type='set'
  1230. from='hag66@shakespeare.example/UUID-a1j/7533'
  1231. to='coven@mix.shakespeare.example'
  1232. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1233. <user-preference xmlns='urn:xmpp:mix:1'/>
  1234. <x xmlns='jabber:x:data' type='submit'>
  1235. <field var='FORM_TYPE' type='hidden'>
  1236. <value>urn:xmpp:mix:1</value>
  1237. </field>
  1238. <field var='JID Visibility'>
  1239. <value>never</value>
  1240. </field>
  1241. <field var='Private Messages'>
  1242. <value>allow</value>
  1243. </field>
  1244. <field var='vCard'>
  1245. <value>block</value>
  1246. </field>
  1247. </x>
  1248. </iq>
  1249. <iq type='result'
  1250. from='coven@mix.shakespeare.example'
  1251. to='hag66@shakespeare.example/UUID-a1j/7533'
  1252. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1253. <user-preference xmlns='urn:xmpp:mix:1'>
  1254. <x xmlns='jabber:x:data' type='result'>
  1255. <field var='FORM_TYPE' type='hidden'>
  1256. <value>urn:xmpp:mix:1</value>
  1257. </field>
  1258. <field var='JID Visibility'>
  1259. <value>never</value>
  1260. </field>
  1261. <field var='Private Messages'>
  1262. <value>allow</value>
  1263. </field>
  1264. <field var='vCard'>
  1265. <value>block</value>
  1266. </field>
  1267. </x>
  1268. </user-preference>
  1269. </iq>
  1270. ]]></example>
  1271. </section3>
  1272. <section3 topic='Leaving a Channel' anchor='usecase-user-leaving'>
  1273. <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:1' 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>
  1274. <example caption="Client Requests to Leave a Channel"><![CDATA[
  1275. <iq type='set'
  1276. from='hag66@shakespeare.example/UUID-a1j/7533'
  1277. to='hag66@shakespeare.example'
  1278. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1279. <leave xmlns='urn:xmpp:mix:1'
  1280. channel='coven@mix.shakespeare.example'/>
  1281. </iq>
  1282. ]]></example>
  1283. <p>
  1284. The user's server will then generate a matching request to the MIX channel.
  1285. </p>
  1286. <example caption="User's Server sends Leave Request to a Channel"><![CDATA[
  1287. <iq type='set'
  1288. from='hag66@shakespeare.example'
  1289. to='coven@mix.shakespeare.example'
  1290. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1291. <leave xmlns='urn:xmpp:mix:1'/>
  1292. </iq>
  1293. ]]></example>
  1294. <p>
  1295. The MIX channel will then remove the user from the channel, as described below. A response is sent to the user's server.
  1296. </p>
  1297. <example caption="Channel Confirms Leave to User's Server"><![CDATA[
  1298. <iq type='result'
  1299. from='coven@mix.shakespeare.example'
  1300. to='hag66@shakespeare.example'
  1301. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1302. <leave xmlns='urn:xmpp:mix:1'/>
  1303. </iq>
  1304. ]]></example>
  1305. <p>
  1306. 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.
  1307. </p>
  1308. <example caption="User's Server Confirms Leave to Client"><![CDATA[
  1309. <iq type='result'
  1310. from='hag66@shakespeare.example'
  1311. to='hag66@shakespeare.example/UUID-a1j/7533'
  1312. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1313. <leave xmlns='urn:xmpp:mix:1'/>
  1314. </iq>
  1315. ]]></example>
  1316. <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.
  1317. 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.
  1318. </p>
  1319. <example caption="Reporting when User Leaves a Channel"><![CDATA[
  1320. <message from='coven@mix.shakespeare.example'
  1321. to='hecate@shakespeare.example' id='f5pp2toz'>
  1322. <event xmlns=''>
  1323. <items node='urn:xmpp:mix:nodes:participants'>
  1324. <retract id='123456#coven@mix.shakespeare.example'/>
  1325. </items>
  1326. </event>
  1327. </message>
  1328. <message from='coven@mix.shakespeare.example'
  1329. to='other-witch@shakespeare.example' id='bar'>
  1330. <event xmlns=''>
  1331. <items node='urn:xmpp:mix:nodes:presence'>
  1332. <retract id='123456#coven@mix.shakespeare.example/8765'/>
  1333. </items>
  1334. </event>
  1335. </message>
  1336. ]]></example>
  1337. </section3>
  1338. <section3 topic="Setting a Nick" anchor="usecase-setting-nick">
  1339. <p>
  1340. 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. A nick MUST be present for a user to send a message to a channel or for a user's presence to be shared on a channel. There are four ways that a user's nick can be obtained. The choice of mechanism or mechanisms is dependent on channel policy:
  1341. </p>
  1342. <ol>
  1343. <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>
  1344. <li>The nick is registered with the MIX service, as described in <link url='#usecase-user-register'> Registering a Nick </link>.</li>
  1345. <li>The user explicitly sets the nick, as described in this section.</li>
  1346. <li>The MIX service generates the nick. In this case it is RECOMMENDED that the assigned nick is a UUID following &rfc4122;.</li>
  1347. </ol>
  1348. <p>
  1349. 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:1' 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.
  1350. </p>
  1351. <example caption="User sets Nick on Channel"><![CDATA[
  1352. <iq type='set'
  1353. from='hag66@shakespeare.example/UUID-a1j/7533'
  1354. to='coven@mix.shakespeare.example'
  1355. id='7nve413p'>
  1356. <setnick xmlns='urn:xmpp:mix:1'>
  1357. <nick>thirdwitch</nick>
  1358. </setnick>
  1359. </iq>
  1360. ]]></example>
  1361. <p>
  1362. 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.
  1363. </p>
  1364. <example caption="Channel informs user of Nick"><![CDATA[
  1365. <iq type='result'
  1366. from='coven@mix.shakespeare.example'
  1367. to'hag66@shakespeare.example/UUID-a1j/7533'
  1368. id='7nve413p'>
  1369. <setnick xmlns='urn:xmpp:mix:1'>
  1370. <nick>thirdwitch</nick>
  1371. </setnick>
  1372. </iq>
  1373. ]]></example>
  1374. </section3>
  1375. <section3 topic='Registering a Nick' anchor='usecase-user-register'>
  1376. <p>A nick MAY be associated with the user's bare JID. A user can register a nick with the MIX service. Nick registration can be used ensure that a user is able to use the same nick in all channels in the service and to prevent other users from using a registered nick. This can help achieve a consistent experience across a set of channels and prevent user confusion. Support for nick registration by a MIX service is OPTIONAL. Where nick registration is supported, nick registration MAY be OPTIONAL or MANDATORY.
  1377. Where a user has registered a Nick with the MIX service, it MAY be used by each channel according to policy for the channel. A channel MAY enforce use of a registered nick. A channel MUST NOT use a registered nick for any other participant.
  1378. </p>
  1379. <p>
  1380. In order to determine if a Nick is allowed to be registered, the user MAY use disco to determine capabilities of the MIX service.
  1381. </p>
  1382. <example caption="User Determines features of the MIX service"><![CDATA[
  1383. <iq type='get'
  1384. from='hag66@shakespeare.example/UUID-a1j/7533'
  1385. to='mix.shakespeare.example'
  1386. id='7nve413p'>
  1387. <query xmlns=''/>
  1388. </iq>
  1389. <iq type='result'
  1390. to='hag66@shakespeare.example/UUID-a1j/7533'
  1391. from='mix.shakespeare.example'
  1392. id='7nve413p'>
  1393. <query xmlns=''/>
  1394. <feature var='urn:xmpp:mix:1#nick-register'/>
  1395. </query>
  1396. </iq>
  1397. ]]></example>
  1398. <p>
  1399. The response will be a list of features of the MIX channel. If Nick Registration is supported, then the result set will include &lt;feature var="urn:xmpp:mix:1#nick-register"/&gt;.
  1400. </p>
  1401. <p>
  1402. To register a nick with the MIX service the user sends
  1403. a register command to the service. This is encoded as a &lt;register/&gt; child element of an &lt;iq/&gt; element. The &lt;register/&gt; element is qualified by the urn:xmpp:mix:1' namespace. The nick is encoded in a &lt;nick/&gt; child element of the &lt;register/&gt; element. </p>
  1404. <example caption="User Registers with Service"><![CDATA[
  1405. <iq type='set'
  1406. from='hag66@shakespeare.example/UUID-a1j/7533'
  1407. to='mix.shakespeare.example'
  1408. id='7nve413p'>
  1409. <register xmlns='urn:xmpp:mix:1'>
  1410. <nick>thirdwitch</nick>
  1411. </register>
  1412. </iq>
  1413. ]]></example>
  1414. <p>On success, the service informs the user of its nick. MIX SHOULD apply the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700; to the requested nick. This means that nick that is issued might be different from the nick that was requested.</p>
  1415. <p>
  1416. When an Nick is assigned, the MIX server MUST update the Participants Node in the channel to reflect this change. Any users subscribed to this node will be notified of the change of Nick.
  1417. </p>
  1418. <p>The following example shows an example of reporting successful Nick assignment.</p>
  1419. <example caption="Service Returns User of Nick"><![CDATA[
  1420. <iq type='result'
  1421. to='mix.shakespeare.example'
  1422. from='hag66@shakespeare.example/UUID-a1j/7533'
  1423. id='7nve413p'>
  1424. <register xmlns='urn:xmpp:mix:1'>
  1425. <nick>thirdwitch</nick>
  1426. </register>
  1427. </iq>
  1428. ]]></example>
  1429. <p>If the requested nick is already taken and the MIX service does not assign an alternate nick, the MIX service MUST return a &lt;conflict/&gt; error:</p>
  1430. <example caption="Nick is Taken">
  1431. <![CDATA[<iq type='error'
  1432. to='mix.shakespeare.example'
  1433. from='hag66@shakespeare.example/UUID-a1j/7533'
  1434. id='7nve413p'>
  1435. <error type='cancel'>
  1436. <conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  1437. </error>
  1438. </iq>
  1439. ]]></example>
  1440. <p>If the register request does not contain a &lt;nick/&gt; element, then the MIX service MUST assign one. It is RECOMMENDED that the assigned nick is a UUID following &rfc4122;.
  1441. </p>
  1442. </section3>
  1443. <section3 topic='Setting User Presence' anchor='usecase-user-presence'>
  1444. <p>
  1445. A user joins a channel over an extended period, and participation in a channel does not generally change when user goes online or offline. The user's participation in a channel is reflected by the user's bare JID in the participant node. All messages to the channel are sent to this JID.
  1446. </p>
  1447. <p>
  1448. A user MAY share presence information with the channel, for one or more online clients. Where a user shares presence information with a channel, the channel is entered by the user's server into the user's roster when the user subscribes to the channel. When an XMPP client comes online or changes presence status, this will be communicated by the user to the user's server using broadcast presence. The user's XMPP server is then responsible to share this presence information to each entry in the roster and in particular to each MIX channel in the roster. The MIX channel will update the "urn:xmpp:mix:nodes:presence" node with any change of status and the updated presence information and then share this updated presence with users subscribed to this node, as described below. When the user sets an explicit status, this is used to modify the presence node in the channel. When a client being used by the user goes offline, the associated server will send presence status "unavailable" to the MIX channel, which will cause the full JID for that client to be removed from the presence node.
  1449. </p>
  1450. <p>
  1451. A channel MAY require that all channel participants share presence information with the channel, which is represented in the "urn:xmpp:mix:nodes:presence" node. If sharing presences is needed by the channel, an XMPP client conforming to this specification MUST share presence with the channel by including the channel in the user's roster. Note that the MIX service cannot generally enforce this, but it can require and enforce that when a message is sent to the channel, that the sender of the message is in the presence list.
  1452. </p>
  1453. <p>
  1454. Presence status and availability is set in a MIX channel by standard presence stanzas sent to the MIX channel by the user's server. Users wishing to receive presence updates will subscribe to the MIX channel presence node. Presence updates are sent out to subscribing participants using standard presence stanzas.
  1455. </p>
  1456. <p>
  1457. A user setting status is now used as an example. Unlike in &xep0045; where coming online is a special action, coming online in MIX is implicit when presence status is set. Going offline is a achieved by setting presence status to unavailable, which removes the client full JID entry from the presence node. When a user sets a presence status, the user's server sends updated presence to the MIX channel, and the MIX service then publishes the user's availability to the "urn:xmpp:mix:nodes:presence" node. If there is not an item named by the full JID of the client with updated presence status, this item is created. The sequence is shown in the following examples, starting with a client setting presences status on the connected server.</p>
  1458. <example caption="Client Sets Presence Status on Server">
  1459. <![CDATA[<presence xmlns='jabber:client' from='hag66@shakespeare.example/UUID-a1j/7533'>
  1460. <show>dnd</show>
  1461. <status>Making a Brew</status>
  1462. </presence>]]></example>
  1463. <p>
  1464. The server then sends the presence information to roster entries. The following example then shows the presence message from the client's server to the MIX channel.
  1465. </p>
  1466. <example caption="Server sends Presence Status to MIX Channel">
  1467. <![CDATA[<presence from='hag66@shakespeare.example/UUID-a1j/7533'
  1468. to='coven@mix.shakespeare.example'>
  1469. <show>dnd</show>
  1470. <status>Making a Brew</status>
  1471. </presence>]]></example>
  1472. <p>The user's presence information is then published by the service to the "urn:xmpp:mix:nodes:presence" node, with the 'publisher' attribute set to the user's participant identifier (the proxy JID). The MIX channel then broadcasts the presence change to all users who are subscribed to the "urn:xmpp:mix:nodes:presence" node. The presence stanza is sent from the full proxy JID of the client updating status.
  1473. Note that presence is associated with a client and so will have a full JID. The following example shows a presence message as distributed by the server to a presences subscriber.</p>
  1474. <example caption="Channel Distributes Presence">
  1475. <![CDATA[<presence from='123435#coven@mix.shakespeare.example/678'
  1476. to='hag99@shakespeare.example'
  1477. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'>
  1478. <nick xmlns=''>thirdwitch</nick>
  1479. <show>dnd</show>
  1480. <status>Making a Brew</status>
  1481. </presence>]]></example>
  1482. <p>
  1483. The presence is distributed to those subscribing to the MIX channel presence node using a standard XMPP presence stanza. The presence change is recorded on the "urn:xmpp:mix:nodes:presence" node. The history of this node will be held as PubSub format in the MAM archive, so that presence history can be viewed.
  1484. </p>
  1485. </section3>
  1486. <section3 topic="Client Coming Online and Obtaining Presence from the Local Server" anchor="usecase-obtaining-presence">
  1487. <p>
  1488. The presence information for a channel is stored in the urn:xmpp:mix:nodes:presence node and distributed using standard presence stanzas to the server of each user subscribing to this presence node. The user's local server will then pass this presence information on to all online clients. This ensures that an online client is kept updated with presence.
  1489. When a client goes offline, it will cease getting presence updates. Presence updates will continue to flow to the user's local server, and so the local server is able maintain up to date presence state for the channel. The user's server MAY cache this presence information to optimize performance or MAY discard it.
  1490. </p>
  1491. <p>
  1492. When the client comes online, it will activate use of the MIX. The user's server will then send full presence status to the client using standard presence messages. This will enable the client to update presence information for the channel. Note that this does not need any interaction with the channel.
  1493. </p>
  1494. </section3>
  1495. <section3 topic="Updating Presence on User&apos;s Server" anchor="usecase-server-presence-update">
  1496. <p>
  1497. In normal operation a MIX participant's server will hold accurate presence status for the channel which it provides to clients when they are activated. Incoming presence updates are immediately sent to active MIX clients.
  1498. </p>
  1499. <p>
  1500. There are two situations where a MIX participant's server will need to get presence status from the channel. The first time is when a user joins the channel as a participant and subscribes to presence. Upon this subscription the MIX channel will send to the participant's server (using the user's bare JID) presence for all of the items in the presence node using standard presence stanzas. This will give the participant's full current presence for the channel.
  1501. </p>
  1502. <p>
  1503. The second scenario is when the MIX participant's server needs to load or refresh presence status for a channel. This will be needed when the participant's server is started. This MIX participant's server requests presence update by sending a directed presence stanza to the MIX channel from the user's bare JID. The MIX channel can distinguish this from a presence update, which will always be sent from the clients full JID. This special presence stanza will send to the participant's server (using the user's bare JID) presence for all of the items in the presence node using standard presence stanzas.
  1504. </p>
  1505. </section3>
  1506. <section3 topic="Determining Real JIDs" anchor="usecase-real-jids">
  1507. <p>
  1508. Presence information will provide a MIX client with the nicks and proxy JIDs for participants in a channel. Messages sent to a channel and retrieved from MAM archives will show the proxy JID and nick of the sender. It is sometimes useful to determine the real JID associated with proxy JID. This can always be done for JID Visible channels and can sometimes be done for JID Maybe Visible channels.
  1509. </p>
  1510. <p>
  1511. For current users JID visible rooms, the real JID is found by a PubSub lookup on the JID Map node. This is shown in the following example:
  1512. </p>
  1513. <example caption='Client looks up Real JID from Proxy JID'><![CDATA[
  1514. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  1515. id='kl2fax27'
  1516. to='coven@mix.shakespeare.example'
  1517. type='get'>
  1518. <pubsub xlns=''>
  1519. <items node='urn:xmpp:mix:nodes:jidmap'>
  1520. <item id='123456#coven@mix.shakespeare.example'/>
  1521. </items>
  1522. </pubsub>
  1523. </iq>
  1524. <iq from='coven@mix.shakespeare.example'
  1525. id='kl2fax27'
  1526. to='hag66@shakespeare.example/UUID-c8y/1573'
  1527. type='result'>
  1528. <pubsub xlns=''>
  1529. <items node='urn:xmpp:mix:nodes:jidmap'>
  1530. <item id='123456#coven@mix.shakespeare.example'>
  1531. <participant xmlns='urn:xmpp:mix:1'>
  1532. <jid>hecate@mix.shakespeare.example</jid>
  1533. </participant>
  1534. </item>
  1535. </items>
  1536. </pubsub>
  1537. <items>
  1538. </iq>]]> </example>
  1539. <p>For JID Maybe Visible rooms the lookup is performed on the JID Maybe Visible Map node. Note that where a user prefers to not share real JID, the result of this lookup of proxy JID will be the (same) proxy JID. </p>
  1540. <p>
  1541. When an older message is considered, it is possible that the proxy JID of the sender is not current. Such a JID can be looked up in the MAM Archive of the JID Map Node. This is shown in the following example:
  1542. </p>
  1543. <example caption='Client looks up Real JID from Proxy JID in MAM Archive'><![CDATA[
  1544. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  1545. id='kl2fax27'
  1546. to='coven@mix.shakespeare.example'
  1547. type='set'>
  1548. <query xlns='urn:xmpp:mam:2'
  1549. queryid='f28'
  1550. node='urn:xmpp:mix:nodes:jidmap'>
  1551. <x xmlns='jabber:x:data' type='submit'>
  1552. <field var='FORM_TYPE' type='hidden'>
  1553. <value>urn:xmpp:mam:2</value>
  1554. </field>
  1555. <field var='id'>
  1556. <value>123456#coven@mix.shakespeare.example</value>
  1557. </field>
  1558. </x>
  1559. </query>
  1560. </iq>
  1561. <message id='iasd208' to='hag66@shakespeare.example/UUID-c8y/1573'>
  1562. <result xmlns='urn:xmpp:mam:2' queryid='f28' id='28482-20987-73623'>
  1563. <forwarded xmlns='urn:xmpp:forward:0'>
  1564. <delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
  1565. <message xmlns="jabber:client">
  1566. <event xmlns=''>
  1567. <items node='urn:xmpp:mix:nodes:jidmap'>
  1568. <item id='123456#coven@mix.shakespeare.example'>
  1569. <participant xmlns='urn:xmpp:mix:1'>
  1570. <jid>hecate@mix.shakespeare.example</jid>
  1571. </participant>
  1572. </item>
  1573. </items>
  1574. </event>
  1575. </message>
  1576. </forwarded>
  1577. </result>
  1578. </message>
  1579. <iq from='coven@mix.shakespeare.example'
  1580. to='hag66@shakespeare.example/UUID-c8y/1573'
  1581. id='kl2fax27'
  1582. type='result'>
  1583. </iq>]]> </example>
  1584. </section3>
  1585. <section3 topic="Coming Online: Synchronizing Message History" anchor="usecase-sync-history">
  1586. <p>
  1587. 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. There are three basic approaches a client will take:
  1588. </p>
  1589. <ol>
  1590. <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>
  1591. <li>The client MAY wish to display a fixed number of messages, perhaps finding more messages if the user subsequently requests.</li>
  1592. <li>The client MAY wish to display messages from a recent time period, perhaps finding more messages if the user subsequently requests.</li>
  1593. </ol>
  1594. <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>
  1595. <p>
  1596. 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 MUX channel.
  1597. </p>
  1598. </section3>
  1599. <section3 topic='Going Offline' anchor='usecase-user-offline'>
  1600. <p>When a client goes offline, this presence update is sent by the client's server to the MIX channel. From the client perspective, this is the same as any other presence change. Handling by the MIX channel is slightly different.</p>
  1601. <example caption="Client Goes Offline in the Channel"><![CDATA[
  1602. <presence type='unavailable'
  1603. from='hag66@shakespeare.example/UUID-a1j/7533'
  1604. to='coven@mix.shakespeare.example'/>
  1605. ]]></example>
  1606. <p>The MIX channel will retract (remove) the item in the presence node of the MIX channel identified by the client's full JID. The MIX channel will notify subscribers to the presence node of the user going offline by sending a presence stanza to the full JID of each client. The presence stanza will reference the full proxy JID of the client that is going offline, as shown in the following example:</p>
  1607. <example caption="Channel Distributes Notification of Client going Offline">
  1608. <![CDATA[<presence from='12345#coven@mix.shakespeare.example/678'
  1609. to='hecate@shakespeare.example'
  1610. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  1611. type='unavailable'/>]]></example>
  1612. <p>
  1613. There is the possibility that the message associated with the user going offline will be lost. If this happens, "ghost" entries will appear in the presence node. A MIX service MAY take steps to address this, for example by probing client with a disco for presence items that remain unchanged for a long period.
  1614. </p>
  1615. <p>
  1616. It is desirable to prevent clients from going offline briefly and then coming back online again, as this will lead to "flapping presence". The RECOMMENDED approach to achieve this is use of &xep0198; to maintain an XMPP client connection in the event of short term TCP failure.
  1617. </p>
  1618. </section3>
  1619. <section3 topic='Sending a Message' anchor='usecase-user-message'>
  1620. <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>
  1621. <example caption="User Sends Message to Channel"><![CDATA[
  1622. <message from='hag66@shakespeare.example/UUID-a1j/7533'
  1623. to='coven@mix.shakespeare.example'
  1624. id='92vax143g'
  1625. type='groupchat'>
  1626. <body>Harpier cries: 'tis time, 'tis time.</body>
  1627. </message>
  1628. ]]></example>
  1629. <p>
  1630. The MIX channel then adds information to the message using a &lt;mix&gt; element qualified by the 'urn:xmpp:mix:1' namespace. This element contains two child elements:
  1631. </p>
  1632. <ol>
  1633. <li>A &lt;nick&gt; element that contains the Nick of the message sender, taken from the Participants Node.</li>
  1634. <li>A &lt;jid&gt; element containing the full proxy JID of the sender.</li>
  1635. </ol>
  1636. <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
  1637. 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>
  1638. <example caption="Channel Puts Message in MAM Archive"><![CDATA[
  1639. <message from='coven@mix.shakespeare.example'
  1640. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  1641. type='groupchat'>
  1642. <body>Harpier cries: 'tis time, 'tis time.</body>
  1643. <mix xmlns='urn:xmpp:mix:1'>
  1644. <nick>thirdwitch</nick>
  1645. <jid>123456#coven@mix.shakespeare.example</jid>
  1646. </mix>
  1647. </message>
  1648. ]]></example>
  1649. <example caption="Channel Reflects Message to Participants"><![CDATA[
  1650. <message from='coven@mix.shakespeare.example'
  1651. to='hecate@shakespeare.example'
  1652. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  1653. type='groupchat'>
  1654. <body>Harpier cries: 'tis time, 'tis time.</body>
  1655. <mix xmlns='urn:xmpp:mix:1'>
  1656. <nick>thirdwitch</nick>
  1657. <jid>123456#coven@mix.shakespeare.example</jid>
  1658. </mix>
  1659. </message>
  1660. ]]></example>
  1661. <p>
  1662. 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.
  1663. </p>
  1664. <example caption="Channel Reflects Message back to Originator"><![CDATA[
  1665. <message from='coven@mix.shakespeare.example'
  1666. to='hag66@shakespeare.example'
  1667. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  1668. type='groupchat'>
  1669. <body>Harpier cries: 'tis time, 'tis time.</body>
  1670. <mix xmlns='urn:xmpp:mix:1'>
  1671. <nick>thirdwitch</nick>
  1672. <jid>123456#coven@mix.shakespeare.example</jid>
  1673. <submission-id>92vax143g</submission-id>
  1674. </mix>
  1675. </message>
  1676. ]]></example>
  1677. </section3>
  1678. <section3 topic="Retracting a Message" anchor="usecase-retract">
  1679. <p>
  1680. A MIX channel MAY support message retraction, where the sender of a messages or an authorized administrator deletes a message. A MIX channel MAY limit the time frame in which a message is allowed to be retracted, for example to prevent retraction of very old messages. When a messages is retracted the original message MAY be replaced by a tombstone. Message retraction is done by sending a special message that identifies the original message. This mechanism allows the retraction to be distributed on the same path as the original message so that all participating servers and clients MAY honour the retraction. The protocol to request retraction does this by adding to a message a &lt;retract&gt; element qualified by the 'urn:xmpp:mix:1' namespace. A retract messages MUST NOT have a body. The &lt;retract&gt; element MUST include an &lt;id&gt; attribute that holds the MAM-ID of the original message. The message sender will need to look up the MAM-ID. The MAM-ID is the convenient message identification for message recipients. A message and it's retraction shown in the following example.
  1681. </p>
  1682. <example caption="User Retracts a Message"><![CDATA[
  1683. <message from='hag66@shakespeare.example/UUID-a1j/7533'
  1684. to='coven@mix.shakespeare.example'
  1685. id='abcde'>
  1686. <body> A Message I did not mean to send </body>
  1687. </message>
  1688. <message from='hag66@shakespeare.example/UUID-a1j/7533'
  1689. to='coven@mix.shakespeare.example'
  1690. id='92vax143g'>
  1691. <retract id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD' xmlns='urn:xmpp:mix:1'/>
  1692. </message>
  1693. ]]></example>
  1694. <p>
  1695. The MIX channel will allow a user to retract a message sent by the user if the 'Allow User Message Retraction' option is configured. The MIX channel will allow an administrative user to retract any message if the user is in the group specified by the 'Administrator Message Retraction Rights' option.
  1696. </p>
  1697. <p>
  1698. If the retraction message is accepted, it MUST be distributed to channel participants. This will allow retraction to happen in the MAM archive of each channel participant and to reflect the retraction in client GUI. A client receiving a retraction message SHOULD ensure that the retracted message is no longer displayed to the end user.
  1699. </p>
  1700. <p>
  1701. Two approaches to message retraction can be used. In the first approach, the retracted message is simply removed. This is appropriate where retraction is provided as a user service and the user has rights to remove messages sent from the record.
  1702. </p>
  1703. <p>
  1704. The second approach is to leave a tombstone, which if taken MUST be done in the following manner. It is recommended to use a tombstone, as simply deleting the message may cause confusion with MAM queries. Use of a tombstone is appropriate where it is desired to leave a record of the message that was redacted.
  1705. With this approach, the original message &lt;body&gt; is removed and replaced with a tombstone using the &lt;retracted&gt; element qualified by the 'urn:xmpp:mix:1' namespace that shows the JID of user performing the retraction and the time of the retraction.
  1706. </p>
  1707. <example caption="Retracted message tombstone in a MAM result"><![CDATA[
  1708. <message id='aeb213' to='juliet@capulet.example/UUID-e3r/9264'>
  1709. <result xmlns='urn:xmpp:mam:1' queryid='f27' id='28482-98726-73623'>
  1710. <forwarded xmlns='urn:xmpp:forward:0'>
  1711. <delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
  1712. <message xmlns='jabber:client' from="hag66@shakespeare.example"
  1713. to="macbeth@shakespeare.example">
  1714. <retracted xmlns='urn:xmpp:mix:1' by='hag66@shakespeare.example'
  1715. time='2010-07-10T23:08:25Z'/>
  1716. </message>
  1717. </forwarded>
  1718. </result>
  1719. </message>
  1720. ]]></example>
  1721. </section3>
  1722. <section3 topic='Telling another User about a Channel' anchor='usecase-user-tell'>
  1723. <p>
  1724. A convenient way to reference another channel is to use &xep0372; which enables the JID of a channel to be shared. This might be used simply to inform the message recipient about the channel or as mechanism to invite the user to join the channel. This is useful as an invitation mechanism to a channel that any user can join or where the invitee knows that the user is allowed to join (e.g., because the channel is for all users in an organization).
  1725. </p>
  1726. </section3>
  1727. <section3 topic='Inviting another User to join a Channel that the user does not have Permission to Join' anchor='usecase-user-invite'>
  1728. <p> Invitation by reference, as described in the previous section, is a convenient approach to invite a user to join a channel that the user has permission to join. This section describes the approach used when the inviter has permission to grant rights for the invitee to become a channel participant. This might be because the inviter is an administrator of the channel or the channel or if the inviter is a channel participant and the channel allows invitation by participants (this channel capability is controlled by the channel configuration variable 'Participation Addition by Invitation from Participant'). Invitation by reference is used to avoid cluttering the allowed node with JIDs of users who are invited to join, but do not accept the invitation.
  1729. When a channel participant(the inviter) invites another user (the invitee) to join a channel, the following sequence of steps is followed:
  1730. </p>
  1731. <ol>
  1732. <li>The inviter checks with disco that the invitee supports MIX.</li>
  1733. <li>The channel inviter sends to the channel requesting an invite for the invitee.</li>
  1734. <li>The channel sends an invitation to the inviter.</li>
  1735. <li>The inviter sends the invitation to the invitee.</li>
  1736. <li>The invitee MAY use the invitation to join the channel.</li>
  1737. <li>The invitee MAY send a response to the inviter, indicating if the invitation was accepted or declined.</li>
  1738. </ol>
  1739. <p>
  1740. The first step is for the inviter to request an invitation from the channel. The invitation contains inviter, invitee and a token. The channel will evaluate if the inviter has rights to issue the invitation. This will be because the inviter is a channel administrator or if the inviter is a channel participant and the channel allows invitation by participants. If the inviter has rights to make the invitation, the channel will return a token. The token is a string that the channel can subsequently use to validate an invitation. The format of the token is not specified in this standard. The encoded token MAY reflect a validity time. The invitation request is encoded as an &lt;invite/&gt; child element of an &lt;iq/&gt; element. The &lt;invite/&gt; element is qualified by the 'urn:xmpp:mix:1' namespace. &lt;invite/&gt; contains an &lt;invitation/&gt; child element, which contain &lt;inviter/&gt;, &lt;invitee/&gt;, &lt;channel/&gt; and &lt;token/&gt; child elements.
  1741. </p>
  1742. <example caption='Inviter Requests and Receives Invitation'><![CDATA[
  1743. <iq from='hag66@shakespeare.example/UUID-h5z/0253'
  1744. id='kl2fax27'
  1745. to='coven@mix.shakespeare.example'
  1746. type='get'>
  1747. <invite xmlns='urn:xmpp:mix:1'>
  1748. <invitee>cat@shakespeare.example</invitee>
  1749. </invite>
  1750. </iq>
  1751. <iq from='coven@mix.shakespeare.example'
  1752. id='kl2fax27'
  1753. to='hag66@shakespeare.example/UUID-h5z/0253'
  1754. type='result'>
  1755. <invite xmlns='urn:xmpp:mix:1'>
  1756. <invitation>
  1757. <inviter>hag66@shakespeare.example</inviter>
  1758. <invitee>cat@shakespeare.example</invitee>
  1759. <channel>coven@mix.shakespeare.example</channel>
  1760. <token>ABCDEF</token>
  1761. </invitation>
  1762. <invite/>
  1763. </iq>
  1764. ]]></example>
  1765. <p>
  1766. The inviter can now send the invitee a message containing the invitation within the &lt;message/&gt; element, as shown in the following example.
  1767. </p>
  1768. <example caption='Inviter sends Invitation to Invitee'><![CDATA[
  1769. <message from='hag66@shakespeare.example/UUID-h5z/0253'
  1770. id='f5pp2toz'
  1771. to='cat@shakespeare.example'>
  1772. <body>Would you like to join the coven?<body>
  1773. <invitation xmlns='urn:xmpp:mix:1'>
  1774. <inviter>hag66@shakespeare.example</inviter>
  1775. <invitee>cat@shakespeare.example</invitee>
  1776. <channel>coven@mix.shakespeare.example</channel>
  1777. <token>ABCDEF</token>
  1778. </invitation>
  1779. </iq>
  1780. ]]></example>
  1781. <p>The invitation can now be used by the invitee to join a channel. The &lt;invitation/&gt; child element is simply added to the standard channel &lt;join/&gt; element, so that the channel can validate the invitation using the token. If the allowed node is present and the invitee is not matched against any item, the channel MUST add the invitee to the allowed node as part of the join.</p>
  1782. <example caption="User Joins a Channel with an Invitation"><![CDATA[
  1783. <iq type='set'
  1784. from='cat@shakespeare.example'
  1785. to='coven@mix.shakespeare.example'
  1786. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  1787. <join xmlns='urn:xmpp:mix:1'>
  1788. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  1789. <invitation>
  1790. <inviter>hag66@shakespeare.example</inviter>
  1791. <invitee>cat@shakespeare.example</invitee>
  1792. <channel>coven@mix.shakespeare.example</channel>
  1793. <token>ABCDEF</token>
  1794. </invitation>
  1795. </join>
  1796. </iq>
  1797. ]]></example>
  1798. <p>The invitee MAY send an acknowledgement back to the inviter, noting the status of the invitation.
  1799. This is encoded as an &lt;invitation-ack/&gt; child element of &lt;message/&gt; element. The &lt;invitation-ack/&gt; element is qualified by the 'urn:xmpp:mix:1' namespace. The &lt;invitation-ack/&gt; has an &lt;invitation/&gt; child element that encodes the invitation being acknowledged and a &lt;value/&gt; child element to encode the acknowledgement value.
  1800. &lt;value/&gt; has the following values:</p>
  1801. <ul>
  1802. <li>'Joined': The invitee has joined the channel.</li>
  1803. <li>'Declined': The invitee is not taking up the invitation.</li>
  1804. <li>'Acknowledged': The invitation is acknowledged, without information on action taken or planned.</li>
  1805. </ul>
  1806. <example caption='Invitee sends Acknowledgement to Inviter'><![CDATA[
  1807. <message from='cat@shakespeare.example/UUID-l1w/8813'
  1808. id='b6p9llze'
  1809. to='hag66@shakespeare.example/UUID-h5z/0253'>
  1810. <body>No Thanks - too busy chasing mice....<body>
  1811. <invitation-ack xmlns='urn:xmpp:mix:1'>
  1812. <value>Declined</value>
  1813. <invitation>
  1814. <inviter>hag66@shakespeare.example</inviter>
  1815. <invitee>cat@shakespeare.example</invitee>
  1816. <channel>coven@mix.shakespeare.example</channel>
  1817. <token>ABCDEF</token>
  1818. </invitation>
  1819. </invitation-ack>
  1820. </iq>
  1821. ]]></example>
  1822. </section3>
  1823. <section3 topic='Sending Private Messages' anchor='usecase-user-private-messages'>
  1824. <p>
  1825. Private Messages are used to provide communication with another channel participant through the MIX channel, without the initiating user knowing the real JID of the channel participant. A channel MAY support use of Private Messages. Private messages are standard XMPP messages and MUST NOT be groupchat. A message goes through a number of stages with different addressing. This is set out in the following table.
  1826. </p>
  1827. <table caption="Setting From and To when sending Private Messages">
  1828. <tr><th>Message</th><th>From</th><th>To</th></tr>
  1829. <tr><td>First Message from Client to MIX Channel</td><td>Full JID of initiator's client</td><td>Proxy bare JID of responder</td></tr>
  1830. <tr><td>First Message from MIX Channel to responder's server</td><td>Proxy full JID of initiator's client</td><td>Bare JID of responder</td></tr>
  1831. <tr><td>First Message from responder's server to one or more of the responder's clients</td><td>Proxy full JID of initiator</td><td>Full JID of responder's client</td></tr>
  1832. <tr><td>Messages from responder's client to MIX Channel</td><td>Full JID of responder's client</td><td>Proxy full JID of initiator's client</td></tr>
  1833. <tr><td>Messages from MIX channel to initiator's client</td><td>Proxy full JID of responder's client</td><td>Full JID of initiator's client</td></tr>
  1834. <tr><td>Messages from initiator's client to MIX Channel</td><td>Full JID of initiator's client</td><td>Proxy full JID of responder's client</td></tr>
  1835. <tr><td>Message from MIX Channel to responder's client</td><td>Proxy full JID of initiator's client</td><td>Full JID of responder's client</td></tr>
  1836. </table>
  1837. <p>Private Messages MAY be archived using MAM by the XMPP servers associated with initiator and responder. Private Messages MUST NOT be archived by the MIX channel.</p>
  1838. </section3>
  1839. <section3 topic="Requesting vCard" anchor="usecase-vcard">
  1840. <p>A client MAY request the vCard of a channel participant by sending a request through the channel. The MIX channel MAY pass this request on or MAY block it. vCard requests MAY use &xep0054; (vcard-temp) or &xep0292; (vCard4 over XMPP). The MIX channel does not process the vCard requests, but simply relays them on to real bare JID of the target. A MIX service MAY choose to relay one or both protocols. Where a MIX service relays one or both of these protocols, each protocol relayed MUST be advertised as a feature of the MIX service. In the following example, using vcard-temp, the requesting client sends a message to the bare proxy JID of the channel participant for which the vCard is desired.</p>
  1841. <example caption="Client directly requests vCard through channel" ><![CDATA[
  1842. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  1843. id='lx09df27'
  1844. to='989898#coven@mix.shakespeare.example'
  1845. type='get'>
  1846. <vCard xmlns='vcard-temp'/>
  1847. </iq>
  1848. ]]></example>
  1849. <p>The MIX channel MAY pass on the vCard request or MAY reject with an error, dependent on channel policy. The MIX service will then address the vCard request to the user's server (using bare JID) using a full proxy JID to hide the requester. </p>
  1850. <example caption="Channel passes on vCard request to the User&apos;s Server" ><![CDATA[
  1851. <iq from='123456#coven@mix.shakespeare.example/6789'
  1852. id='lx09df27'
  1853. to='peter@shakespeare.example'
  1854. type='get'>
  1855. <vCard xmlns='vcard-temp'/>
  1856. </iq>
  1857. ]]></example>
  1858. <p>
  1859. The user's server, on behalf of the user, MAY send a response or reject with an error. The user's server will send the vCard back to the channel.
  1860. </p>
  1861. <example caption="User's Server sends vCard Response via MIX channel" ><![CDATA[
  1862. <iq from='peter@shakespeare.example'
  1863. id='lx09df27'
  1864. to='123456#coven@mix.shakespeare.example/6789'
  1865. type='result'>
  1866. <vCard xmlns='vcard-temp'>
  1867. <FN>Peter Saint-Andre</FN>
  1868. <N>
  1869. <FAMILY>Saint-Andre</FAMILY>
  1870. <GIVEN>Peter</GIVEN>
  1871. <MIDDLE/>
  1872. </N>
  1873. <NICKNAME>stpeter</NICKNAME>
  1874. <URL></URL>
  1875. </vCard>
  1876. <query xmlns=''>
  1877. </iq>
  1878. ]]></example>
  1879. <p>
  1880. The MIX channel will then send the vCard response to the requesting client on behalf of the client sending the response.
  1881. </p>
  1882. <example caption="MIX Channel sends vCard responst to Client" ><![CDATA[
  1883. <iq from='989898#coven@mix.shakespeare.example'
  1884. id='lx09df27'
  1885. to='hag66@shakespeare.example/UUID-c8y/1573'
  1886. type='result'>
  1887. <vCard xmlns='vcard-temp'>
  1888. <FN>Peter Saint-Andre</FN>
  1889. <N>
  1890. <FAMILY>Saint-Andre</FAMILY>
  1891. <GIVEN>Peter</GIVEN>
  1892. <MIDDLE/>
  1893. </N>
  1894. <NICKNAME>stpeter</NICKNAME>
  1895. <URL></URL>
  1896. </vCard>
  1897. </iq>
  1898. ]]></example>
  1899. </section3>
  1900. </section2>
  1901. <section2 topic="Presence Initializion" anchor="use-presence-initialize">
  1902. <p>
  1903. For an active MIX Channel, the presence node is updated as channel participants change status and presence information is sent to the channel. When a MIX channel starts, typically when the associated MIX Service and Server start, there is a need to initialize the presence node. This is done by the XMPP server associated with the MIX channel sending out a presence probe for each channel participant, following the presence probe process specified in &rfc6121;. A presence probe MUST NOT be sent for users who have set presence preference to not sharing.
  1904. </p>
  1905. </section2>
  1906. <section2 topic="Ensuring Message Delivery" anchor="use-ensure-delivery">
  1907. <p>
  1908. 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. This section describes how MIX addresses this.
  1909. </p>
  1910. <p>
  1911. When there is a long term connection failure, the MIX channel will receive an error from the XMPP server indicating that a message failed to transfer to a recipient. When this happens, the MIX channel MUST take responsibility to ensure that the message is retransmitted and delivered. When the MIX channel detects a failure it will make use of an IQ Marker message to determine when the connection to the peer server is working again. Once the channel has received a response to the marker IQ it will retransmit the pending messages. The marker is encoded as a &lt;marker/&gt; child element of an &lt;iq/&gt; element. The &lt;marker/&gt; element is qualified by the 'urn:xmpp:mix:1' namespace.
  1912. </p>
  1913. <example caption="Channel Sends Marker Message" ><![CDATA[
  1914. <iq from='coven@mix.shakespeare.example'
  1915. id='lx09df27'
  1916. to='hag66@shakespeare.example'
  1917. type='get'>
  1918. <marker xmlns='urn:xmpp:mix:1'/>
  1919. </iq>
  1920. <iq from='hag66@shakespeare.example'
  1921. id='lx09df27'
  1922. to='coven@mix.shakespeare.example'
  1923. type='result'>
  1924. <marker xmlns='urn:xmpp:mix:1'/>
  1925. </iq>
  1926. ]]></example>
  1927. </section2>
  1928. <section2 topic="Use of MAM" anchor="use-mam">
  1929. <p>
  1930. 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.
  1931. </p>
  1932. <section3 topic="Archive of Messages" anchor="use-mam-messages">
  1933. <p>
  1934. 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.
  1935. </p>
  1936. </section3>
  1937. <section3 topic="Retrieving Messages" anchor="use-mam-retrieve">
  1938. <p>
  1939. 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.
  1940. </p>
  1941. <p>
  1942. 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.
  1943. </p>
  1944. </section3>
  1945. <section3 topic="MAM Use with other Channel Nodes" anchor="use-mam-other-nodes">
  1946. <p>
  1947. 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.
  1948. </p>
  1949. </section3>
  1950. </section2>
  1951. <section2 topic='Administrative Use Cases' anchor='usecases-admin'>
  1952. <section3 topic='Checking For Permission To Create a Channel' anchor='usecase-admin-check-create'>
  1953. <p>
  1954. 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:1#create-channel' feature is returned, the user is able to create a channel.
  1955. </p>
  1956. <example caption="Client determines Capability to Create a Channel" ><![CDATA[
  1957. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  1958. id='lx09df27'
  1959. to='mix.shakespeare.example'
  1960. type='get'>
  1961. <query xmlns=''/>
  1962. </iq>
  1963. <iq from='mix.shakespeare.example'
  1964. id='lx09df27'
  1965. to='hag66@shakespeare.example/UUID-c8y/1573'
  1966. type='result'>
  1967. <query xmlns=''>
  1968. <identity
  1969. category='conference'
  1970. name='Shakespearean Chat Service'
  1971. type='text'/>
  1972. <feature var='urn:xmpp:mix:1'/>
  1973. <feature var='urn:xmpp:mix:1#create-channel'>
  1974. </query>
  1975. </iq>
  1976. ]]></example>
  1977. </section3>
  1978. <section3 topic='Creating a Channel' anchor='usecase-admin-create'>
  1979. <p>
  1980. 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:1' 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.
  1981. </p>
  1982. <example caption="Creating a Channel with Default Parameters" ><![CDATA[
  1983. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  1984. id='lx09df27'
  1985. to='mix.shakespeare.example'
  1986. type='set'>
  1987. <create channel='coven' xmlns='urn:xmpp:mix:1'/>
  1988. </iq>
  1989. <iq from='mix.shakespeare.example'
  1990. id='lx09df27'
  1991. to='hag66@shakespeare.example/UUID-a1j/7533'
  1992. type='result'>
  1993. <create channel='coven' xmlns='urn:xmpp:mix:1'/>
  1994. </iq>
  1995. ]]></example>
  1996. <p>
  1997. The client MAY also include parameters in &xep0004; format as part of channel creation. If the client wishes to inspect configuration, channel administration procedures SHOULD be used.
  1998. </p>
  1999. <example caption="Creating a Channel with Client Specified Parameters" ><![CDATA[
  2000. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2001. id='lx09df27'
  2002. to='mix.shakespeare.example'
  2003. type='set'>
  2004. <create channel='coven' xmlns='urn:xmpp:mix:1'>
  2005. <x xmlns='jabber:x:data' type='submit'>
  2006. <field var='FORM_TYPE' type='hidden'>
  2007. <value>urn:xmpp:mix:1</value>
  2008. </field>
  2009. <field var='Owner'>
  2010. <value>hecate@shakespeare.example</value>
  2011. <value>greymalkin@shakespeare.example</value>
  2012. </field>
  2013. <field var='Messages Node Subscription'>
  2014. <value>allowed</value>
  2015. </field>
  2016. <field var='JID Visibility'>
  2017. <value>jid-mandatory-visible</value>
  2018. </field>
  2019. <field var='No Private Messages'>
  2020. <value>true</value>
  2021. </field>
  2022. </x>
  2023. </create>
  2024. </iq>
  2025. <iq from='mix.shakespeare.example'
  2026. id='lx09df27'
  2027. to='hag66@shakespeare.example/UUID-a1j/7533'
  2028. type='result'>
  2029. <create channel='coven' xmlns='urn:xmpp:mix:1'/>
  2030. </iq>
  2031. ]]></example>
  2032. </section3>
  2033. <section3 topic='Creating a Channel for Ad Hoc Use' anchor='usecase-admin-create-adhoc'>
  2034. <p>
  2035. 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.
  2036. </p>
  2037. <example caption="Creating a Channel for Ad Hoc Use" ><![CDATA[
  2038. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2039. id='lx09df27'
  2040. to='mix.shakespeare.example'
  2041. type='set'>
  2042. <create xmlns='urn:xmpp:mix:1'/>
  2043. </iq>
  2044. <iq from='mix.shakespeare.example'
  2045. id='lx09df27'
  2046. to='hag66@shakespeare.example/UUID-a1j/7533'
  2047. type='result'>
  2048. <create channel='A1B2C345' xmlns='urn:xmpp:mix:1'/>
  2049. </iq>
  2050. ]]></example>
  2051. </section3>
  2052. <section3 topic="Converting a 1:1 Conversation to a Channel" anchor="usecase-admin-converting-chat">
  2053. <p>
  2054. A common use case for an ad hoc channel is where two users are engaged in a 1:1 chat and wish to broaden the discussion. Prior to bringing more users into a channel, using standard invitation process, there is a need to create and populate a channel. The first step is for one of the two users to create an ad hoc channel, as described in the previous section. The other user will then be invited, and can switch to the new channel.
  2055. </p>
  2056. <p>
  2057. It can also be useful to share some or all of the messages from the 1:1 discussion into the new channel. The mechanism to do this is to forward messages to be shared in the MUC using &xep0297;. A body SHOULD NOT be used in the outer message.
  2058. Sharing history is optional. If history is shared, it MUST be done by the user creating the channel before the other user is invited. Any other use of forwarded messages MUST be treated as a member of the MUC forwarding a message to the channel and MUST NOT be treated as history sharing.
  2059. </p>
  2060. <example caption="Forwarding a message to create History" ><![CDATA[
  2061. <message from='hag66@shakespeare.example/UUID-a1j/7533'
  2062. to='A1B2C345@mix.shakespeare.example'
  2063. id='92vax143g'
  2064. type='groupchat'>
  2065. <forwarded xmlns='urn:xmpp:forward:0'>
  2066. <delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
  2067. <message from='hag67@shakespeare.example/pda'
  2068. id='0202197'
  2069. to='hag66@shakespeare.example/UUID-a1j/7533'
  2070. type='chat'
  2071. xmlns='jabber:client'>
  2072. <body>Harpier cries: 'tis time, 'tis time.</body>
  2073. </message>
  2074. </forwarded>
  2075. </message>
  2076. ]]></example>
  2077. <p>
  2078. There are a number of security considerations with use of MUC history. There may be sensitive information in the 1:1 MUC history, and the user sharing this history should ensure that none of this is sensitive, prior to sharing in this way. The user creating the MUC has potential to inject history messages which were not part of the history. It is recommended that the second user joining the MUC to validate that the messages match the history and to take appropriate action if they do not.
  2079. </p>
  2080. </section3>
  2081. <section3 topic='Destroying a Channel' anchor='usecase-admin-destroy'>
  2082. <p>
  2083. 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. 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.
  2084. </p>
  2085. <p>
  2086. 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:1' namespace. The &lt;destroy/&gt; element MUST have a 'channel' attribute to specify the channel to be destroyed.
  2087. A client destroys a channel using a simple set operation, as shown in the following example.
  2088. </p>
  2089. <example caption="Client Destroys a Channel" ><![CDATA[
  2090. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2091. id='lx09df27'
  2092. to='mix.shakespeare.example'
  2093. type='set'>
  2094. <destroy channel='coven' xmlns='urn:xmpp:mix:1'/>
  2095. </iq>
  2096. <iq from='mix.shakespeare.example'
  2097. id='lx09df27'
  2098. to='hag66@shakespeare.example/UUID-a1j/7533'
  2099. type='result'>
  2100. </iq>
  2101. ]]></example>
  2102. </section3>
  2103. <section3 topic='Server Destroying a Channel' anchor='usecase-server-destroy'>
  2104. <p>
  2105. A server MUST destroy a channel that has exceeded its specified explicit lifetime.
  2106. 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.
  2107. </p>
  2108. </section3>
  2109. <section3 topic='Modifying Channel Information' anchor='usecase-admin-information'>
  2110. <p>Authorized users, typically owners and sometimes administrators, MAY modify the channel information. The client MAY issue a pubsub get command to obtain a form that will facilitate update of the information node. The values in the form show current values, which be defaults or MAY have been explicitly set. In the following example, the channel name was previously set, but other values were not. </p>
  2111. <example caption="Getting Information Form" ><![CDATA[
  2112. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2113. id='lx09df27'
  2114. to='mix.shakespeare.example'
  2115. type='get'>
  2116. <pubsub xmlns=''>
  2117. <items node='urn:xmpp:mix:nodes:info'/>
  2118. </pubsub>
  2119. </iq>
  2120. <iq from='mix.shakespeare.example'
  2121. id='lx09df27'
  2122. to='hag66@shakespeare.example/UUID-a1j/7533'
  2123. type='result'>
  2124. <pubsub xmlns=''>
  2125. <items node='urn:xmpp:mix:nodes:info'>
  2126. <x xmlns='jabber:x:data' type='form'>
  2127. <field var='FORM_TYPE' type='hidden'>
  2128. <value>urn:xmpp:mix:1</value>
  2129. </field>
  2130. <title>Information Node Modification</title>
  2131. <field type='text-multi'
  2132. label='Channel Name'
  2133. var='Name'>
  2134. <value>Witches Coven</value>
  2135. </field>
  2136. <field type='text-multi'
  2137. label='Channel Description'
  2138. var='Description'/>
  2139. <field type='jid-single'
  2140. label='Channel Administrative Contact'
  2141. var='Contact'/>
  2142. </x>
  2143. </items>
  2144. </pubsub>
  2145. </iq>
  2146. ]]></example>
  2147. <p> Updating the information node is done using a pubsub set command. The MIX channel MUST update the fields with values provided, leaving other fields unchanged. The result returns the id used in the information node item, which is the date/time of the modification. </p>
  2148. <example caption="Modifying Channel Information" ><![CDATA[
  2149. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2150. id='lx09df27'
  2151. to='mix.shakespeare.example'
  2152. type='set'>
  2153. <pubsub xmlns=''>
  2154. <publish node='urn:xmpp:mix:nodes:info'>
  2155. <x xmlns='jabber:x:data' type='submit'>
  2156. <field var='FORM_TYPE' type='hidden'>
  2157. <value>urn:xmpp:mix:1</value>
  2158. </field>
  2159. <field var='Name'>
  2160. <value>Witches Coven</value>
  2161. </field>
  2162. <field var='Description'>
  2163. <value>A location not far from the blasted heath where
  2164. the three witches meet</value>
  2165. </field>
  2166. <field var='Contact'>
  2167. <value>greymalkin@shakespeare.example</value>
  2168. </field>
  2169. </x>
  2170. </publish>
  2171. </pubsub>
  2172. </iq>
  2173. <iq from='mix.shakespeare.example'
  2174. id='lx09df27'
  2175. to='hag66@shakespeare.example/UUID-a1j/7533'
  2176. type='result'>
  2177. <pubsub xmlns=''>
  2178. <publish node='urn:xmpp:mix:nodes:info'>
  2179. <item id='2016-05-30T09:00:00' xmlns='urn:xmpp:mix:1'/>
  2180. </publish>
  2181. </pubsub>
  2182. </iq>
  2183. ]]></example>
  2184. </section3>
  2185. <section3 topic='Modifying Channel Configuration' anchor='usecase-admin-information'>
  2186. <p>Channel owners are allowed to modify the channel configuration. The client MAY issue a pubsub get command to obtain a form that will facilitate update of the configuration node. Other clients MAY be authorized to use this command to see the channel configuration, but only owners MAY update the configuration. The values in the form show current values, which MAY be defaults or MAY have been explicitly set. The following example shows a short form returned to illustrate the syntax. A typical configuration form will be much larger with many fields. Modifying channel configuration is done directly by a client.
  2187. </p>
  2188. <example caption="Getting Configuration Form" ><![CDATA[
  2189. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2190. id='lx09df27'
  2191. to='mix.shakespeare.example'
  2192. type='get'>
  2193. <pubsub xmlns=''>
  2194. <items node='urn:xmpp:mix:nodes:config'/>
  2195. </pubsub>
  2196. </iq>
  2197. <iq from='mix.shakespeare.example'
  2198. id='lx09df27'
  2199. to='hag66@shakespeare.example/UUID-a1j/7533'
  2200. type='result'>
  2201. <pubsub xmlns=''>
  2202. <items xmlns='urn:xmpp:mix:1' node='urn:xmpp:mix:nodes:config'>
  2203. <x xmlns='jabber:x:data' type='form'>
  2204. <field var='FORM_TYPE' type='hidden'>
  2205. <value>urn:xmpp:mix:1</value>
  2206. </field>
  2207. <title>Configuration Node Modification</title>
  2208. <field type='jid-multi'
  2209. label='Channel Administrator'
  2210. var='Administrator'/>
  2211. </x>
  2212. </items>
  2213. </pubsub>
  2214. </iq>
  2215. ]]></example>
  2216. <p> Updating the information node is done using a pubsub set command. The MIX channel MUST update the fields with values provided, leaving other fields unchanged. The result returns the id used in the configuration node item, which is the date/time of the modification. </p>
  2217. <example caption="Modifying Channel Configuration" ><![CDATA[
  2218. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2219. id='lx09df27'
  2220. to='mix.shakespeare.example'
  2221. type='set'>
  2222. <pubsub xmlns=''>
  2223. <publish node='urn:xmpp:mix:nodes:config'>
  2224. <x xmlns='jabber:x:data' type='submit'>
  2225. <field var='FORM_TYPE' type='hidden'>
  2226. <value>urn:xmpp:mix:1</value>
  2227. </field>
  2228. <field var='Owner'>
  2229. <value>hecate@shakespeare.example</value>
  2230. <value>greymalkin@shakespeare.example</value>
  2231. </field>
  2232. <field var='Messages Node Subscription'>
  2233. <value>allowed</value>
  2234. </field>
  2235. <field var='JID Visibility'>
  2236. <value>jid-mandatory-visible</value>
  2237. </field>
  2238. <field var='No Private Messages'>
  2239. <value>true</value>
  2240. </field>
  2241. </x>
  2242. </publish>
  2243. </pubsub>
  2244. </iq>
  2245. <iq from='mix.shakespeare.example'
  2246. id='lx09df27'
  2247. to='hag66@shakespeare.example/UUID-a1j/7533'
  2248. type='result'>
  2249. <pubsub xmlns=''>
  2250. <publish node='urn:xmpp:mix:nodes:config'>
  2251. <item id='2016-05-30T09:00:00' xmlns='urn:xmpp:mix:1'/>
  2252. </publish>
  2253. </pubsub>
  2254. </iq>
  2255. ]]></example>
  2256. </section3>
  2257. <section3 topic='Controlling Channel Participants' anchor='usecase-admin-participants'>
  2258. <p>
  2259. Owners and Administrators are allowed to control which users can participate in a channel by use of Allowed and Banned lists using PubSub. These operations follow &xep0060; which sets out detailed protocol use and error handling.
  2260. Allowed and Banned lists MAY be read by PubSub get of the Banned and Allowed Nodes. This operation MAY be used by users as controlled by 'Allowed Node Subscription' and 'Banned Node Subscription' configuration node options (default Administrators).
  2261. </p>
  2262. <example caption="Client Reads Allowed Node" ><![CDATA[
  2263. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2264. id='lx09df27'
  2265. to='mix.shakespeare.example'
  2266. type='get'>
  2267. <pubsub xmlns=''>
  2268. <items node='urn:xmpp:mix:nodes:allowed'/>
  2269. </pubsub>
  2270. </iq>
  2271. <iq from='mix.shakespeare.example'
  2272. id='lx09df27'
  2273. to='hag66@shakespeare.example/UUID-a1j/7533'
  2274. type='result'>
  2275. <pubsub xmlns=''>
  2276. <items node='urn:xmpp:mix:nodes:allowed'>
  2277. <item id='shakespeare.example'/>
  2278. <item id='alice@wonderland.example'/>
  2279. </items>
  2280. </pubsub>
  2281. </iq>
  2282. ]]></example>
  2283. <p>
  2284. JIDs can be added to the Allowed and Banned nodes by a pubsub set command. This is used to add one item to a node.
  2285. </p>
  2286. <example caption="Client Adds a JID to the Allowed Node" ><![CDATA[
  2287. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2288. id='lx09df27'
  2289. to='mix.shakespeare.example'
  2290. type='set'>
  2291. <pubsub xmlns=''>
  2292. <publish node='urn:xmpp:mix:nodes:allowed'>
  2293. <item id='marlow.example'/>
  2294. </publish>
  2295. </pubsub>
  2296. </iq>
  2297. <iq from='mix.shakespeare.example'
  2298. id='lx09df27'
  2299. to='hag66@shakespeare.example/UUID-a1j/7533'
  2300. type='result'>
  2301. <pubsub xmlns=''/>
  2302. </iq>
  2303. ]]></example>
  2304. <p>
  2305. JIDs can be removed from the Allowed and Banned nodes by pubsub retract command.
  2306. </p>
  2307. <example caption="Client Removes a JID from the Banned Node" ><![CDATA[
  2308. <iq from='hag66@shakespeare.example/UUID-a1j/7533'
  2309. id='lx09df27'
  2310. to='mix.shakespeare.example'
  2311. type='set'>
  2312. <pubsub xmlns=''>
  2313. <retract node='urn:xmpp:mix:nodes:banned'>
  2314. <item id='lear@shakespeare.example'/>
  2315. </retract>
  2316. </pubsub>
  2317. </iq>
  2318. <iq from='mix.shakespeare.example'
  2319. id='lx09df27'
  2320. to='hag66@shakespeare.example/UUID-a1j/7533'
  2321. type='result'>
  2322. <pubsub xmlns=''/>
  2323. </iq>
  2324. ]]></example>
  2325. <p>
  2326. When the MIX channel adds a JID to the banned node, other nodes in the MIX channel will be appropriately updated to reflect this change. In particular, the participants nodes and presence nodes will be updated to remove matching JIDs. This will have the effect of immediately removing the user from the channel. For this reason, there is no requirement to have the "kick" functionality of MUC, as this is achieved by banning the user.
  2327. </p>
  2328. </section3>
  2329. </section2>
  2330. </section1>
  2331. <section1 topic="MIX Requirements on Participant's Server" anchor="mix-requirements-participant-server">
  2332. <p>
  2333. This section defines behaviour REQUIRED by MIX for servers supporting MIX participants. This provides the full MIX specification for clients and servers is set out in a single document. This functionality MUST be provided by servers used by clients that participate in MIX channels. In future, the specifications in this section MAY be moved to a separate XEP or it MAY be incorporated into
  2334. &xep0376; (PAM) which follows a similar model.
  2335. </p>
  2336. <section2 topic="Server Identification of MIX Capabable Clients" anchor="server-identification-mix-clients">
  2337. <p>
  2338. A MIX User's server MUST determine which online clients support MIX. This will enable the server to send MIX traffic to all MIX capable clients. A MIX capable client MAY choose to come online and not advertise MIX capability. The mechanism for a server to discover client capability is described in <link url="#mix-client-discovery">Discovering Client MIX Capability</link>.
  2339. </p>
  2340. </section2>
  2341. <section2 topic="Messages From MIX Channels" anchor="mix-from">
  2342. <p>
  2343. Messages from a MIX channel will usually go to the participant's server. The only exception to this is where the MIX channel is responding directly to messages from the client. Messages and presence distributed but a MIX channel will always be sent to the participant's server and addressed to the user's bare JID. The participant's server will simply send on the messages from the channel to each of the user's online clients which advertise MIX capability. If there are no such clients activated, the message is dropped.
  2344. </p>
  2345. <p>
  2346. Messages sent to the participant's sever will always be addressed to the user's bare JID. The participant’s server will modify the recipient to the full JID of each client to which the message is forwarded. The participant's server MUST NOT make any other modifications to each message. The following example, repeated from earlier, shows a message distributed by a MIX channel and directed to the participant’s server with the participant's bare JID.
  2347. </p>
  2348. <example caption="Channel Reflects Message to Participants"><![CDATA[
  2349. <message from='coven@mix.shakespeare.example'
  2350. to='hecate@shakespeare.example'
  2351. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  2352. type='groupchat'>
  2353. <body>Harpier cries: 'tis time, 'tis time.</body>
  2354. <mix xmlns='urn:xmpp:mix:1'>
  2355. <nick>thirdwitch</nick>
  2356. <jid>123456#coven@mix.shakespeare.example</jid>
  2357. </mix>
  2358. </message>
  2359. ]]></example>
  2360. <p>
  2361. The server receiving the message will then deliver the messages to all online clients. Messages are delivered to all available online resources irrespective of
  2362. status and resource priority.
  2363. The following example shows how the participant's server modifies the inbound message to replace the bare JID in the 'to' with a full JID for each of two active MIX clients.
  2364. </p>
  2365. <example caption="Participant's Server Sends Modified Message to two Clients"><![CDATA[
  2366. <message from='coven@mix.shakespeare.example'
  2367. to='hecate@shakespeare.example/UUID-x4r/2491'
  2368. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  2369. type='groupchat'>
  2370. <body>Harpier cries: 'tis time, 'tis time.</body>
  2371. <mix xmlns='urn:xmpp:mix:1'>
  2372. <nick>thirdwitch</nick>
  2373. <jid>123456#coven@mix.shakespeare.example</jid>
  2374. </mix>
  2375. </message>
  2376. <message from='coven@mix.shakespeare.example'
  2377. to='hecate@shakespeare.example/UUID-b5b/0114'
  2378. id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
  2379. type='groupchat'>
  2380. <body>Harpier cries: 'tis time, 'tis time.</body>
  2381. <mix xmlns='urn:xmpp:mix:1'>
  2382. <nick>thirdwitch</nick>
  2383. <jid>123456#coven@mix.shakespeare.example</jid>
  2384. </mix>
  2385. </message>
  2386. ]]></example>
  2387. </section2>
  2388. <section2 topic="Messages To MIX Channels" anchor="user-server-to">
  2389. <p>
  2390. Messages sent by a MIX channel participant to the MIX channel are always sent from a MIX client directly to the channel. The participant's server relays the message but does not modify the messages.
  2391. </p>
  2392. </section2>
  2393. <section2 topic="Client Determines MIX Capability of Local Server" anchor="user-server-client-capability">
  2394. <p>
  2395. Servers supporting the capabilities necessary to enable MIX clients MUST advertise this. A client wishing to use MIX MUST check for this capability in the server before using MIX. The capability is represented by the 'urn:xmpp:mix:account:0' feature.
  2396. </p>
  2397. <example caption="Client Determines MIX Capability of Local Server"><![CDATA[
  2398. <iq from='hag66@shakespeare.example/UUID-c8y/1573'
  2399. id='lx09df27'
  2400. type='get'>
  2401. <query xmlns=''/>
  2402. </iq>
  2403. <iq from='shakespeare.example'
  2404. id='lx09df27'
  2405. to='hag66@shakespeare.example/UUID-c8y/1573'
  2406. type='result'>
  2407. <query xmlns=''>
  2408. <feature var='urn:xmpp:mix:account:0'/>
  2409. </query>
  2410. </iq>
  2411. ]]></example>
  2412. </section2>
  2413. <section2 topic="MIX Management and Discovery" anchor="user-server-disco">
  2414. <p>
  2415. Most interaction between a MIX client and a MIX channel is directly between the client and the channel. The participant's server relays the message but does not modify the messages. In particular configuration management and discovery is direct. Interaction will be direct, unless explicitly stated otherwise.
  2416. </p>
  2417. </section2>
  2418. <section2 topic="IQ Support on Local Server" anchor="mix-diso">
  2419. <p>
  2420. Channel Join and Leave functions operate indirectly through the participant's server. The reason for this is that where a channel shares user presence, the channel is included in the user's roster which is managed in the local server. The Join and Leave functions lead to roster changes and so they MUST go through the participant's server. This is included in each of the operations that work in this manner. The general mechanism to achieve this is illustrated by example in this section.
  2421. The client addresses indirect messages to the user's own bare JID, indicating the channel with the channel attribute. This is illustrated below.
  2422. </p>
  2423. <example caption="Client sends request to local server to Join a MIX Channel"><![CDATA[
  2424. <iq type='set'
  2425. from='hag66@shakespeare.example/UUID-a1j/7533'
  2426. to='hag66@shakespeare.example'
  2427. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  2428. <join xmlns='urn:xmpp:mix:1'
  2429. channel='coven@mix.shakespeare.example'>
  2430. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  2431. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  2432. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  2433. <subscribe node='urn:xmpp:mix:nodes:config'/>
  2434. </join>
  2435. </iq>
  2436. ]]></example>
  2437. <p>This is then modified by the local server and sent to the MIX channel. This is shown in the following example, repeated from the earlier specification of channel behaviour. </p>
  2438. <example caption="Participant's Server sends Join to MIX Channel"><![CDATA[
  2439. <iq type='set'
  2440. from='hag66@shakespeare.example'
  2441. to='coven@mix.shakespeare.example'
  2442. id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
  2443. <join xmlns='urn:xmpp:mix:1'>
  2444. <subscribe node='urn:xmpp:mix:nodes:messages'/>
  2445. <subscribe node='urn:xmpp:mix:nodes:presence'/>
  2446. <subscribe node='urn:xmpp:mix:nodes:participants'/>
  2447. <subscribe node='urn:xmpp:mix:nodes:config'/>
  2448. </join>
  2449. </iq>
  2450. ]]></example>
  2451. <p>
  2452. The MIX service will send the IQ response to indirect messages to the user's server using the user's bare JID. The user's server will then route the response back to the user's client.
  2453. </p>
  2454. </section2>
  2455. <section2 topic="Roster Management" anchor="proxy-roster">
  2456. <p>
  2457. The participant's server is responsible for ensuring that MIX channels are correctly entered into the user's roster when user's join MIX channels and for removing them when they leave.
  2458. </p>
  2459. <p>
  2460. The participant's server MUST ensure that only presence information from clients that advertise MIX capability is sent to the MIX channel. So, if a user has two online clients, but only one is MIX capable, then the channel will only receive presence information relating to the MIX client.
  2461. </p>
  2462. </section2>
  2463. <section2 topic="MIX Roster Item Capability Sharing" anchor="mix-roster-capability-sharing">
  2464. <p>It is useful for a MIX client to know which roster members are MIX channels, as this will facilitate convenient presentation of subscribed MIX channels to the user. A MIX client MAY request that the server return this additional information that annotates roster elements with MIX capability. The server MUST return the additional information. The request is made by extending the standard roster get request by adding a child element &lt;annotate/&gt; to the &lt;query/&gt; element. The &lt;annotate/&gt; element is qualified by the ‘urn:xmpp:mix:roster:0' namespace.</p>
  2465. <example caption="Roster Get Requesting MIX Information"><![CDATA[
  2466. <iq from=''
  2467. id='bv1bs71f'
  2468. type='get'>
  2469. <query xmlns='jabber:iq:roster'>
  2470. <annotate xmlns='urn:xmpp:mix:roster:0'/>
  2471. <query/>
  2472. </iq>
  2473. ]]></example>
  2474. <p>A standard roster item is encoded as follows.</p>
  2475. <example caption="Standard Roster Item Encoding"><![CDATA[
  2476. <item jid=''/>
  2477. ]]></example>
  2478. <p>
  2479. MIX channels in the roster information returned in response to a request for this additional MIX information MUST have an element &lt;channel/&gt; qualified by the ‘urn:xmpp:mix:roster:0' namespace included in the roster item, as shown inf the following example.
  2480. </p>
  2481. <example caption="Roster Item Encoding of a MIX Channel"><![CDATA[
  2482. <item jid=''>
  2483. <channel xmlns='urn:xmpp:mix:roster:0'/>
  2484. </item>
  2485. ]]></example>
  2486. </section2>
  2487. <section2 topic="MAM Archive Support" anchor="proxy-mam">
  2488. <p>
  2489. Archive of MIX channel messages is done by the participant's server. Where a message is sent to the participant's server and discarded because there are no active clients, it will still be archived. This means that the messages will be available in the local archive and can be picked up by clients when they come online.
  2490. </p>
  2491. </section2>
  2492. </section1>
  2493. <section1 topic="Supporting MIX and MUC together" anchor="mix-and-muc-together">
  2494. <p>
  2495. MIX is specified as a service that can be used independent of MUC and a MIX service MAY be implemented without MUC. If both MIX and MUC are implemented, three approaches are noted.
  2496. </p>
  2497. <ol>
  2498. <li>Entirely separate MIX and MUC implementation, with MIX and MUC using separate domains and MIX channels being completely separate from MUC rooms.</li>
  2499. <li>Fully integrated MIX and MUC implementation, with MIX and MUC sharing a single domain and rooms/channels equivalent.</li>
  2500. <li>Partially integrated MIX and MUC implementation, with MIX and MUC using separate domains, but rooms/channel are common. This means that each MIX channel will have MUC room of the same name and same participants.</li>
  2501. </ol>
  2502. <p>The fully integrated approach would be transparent to clients. The following example shows how a MIX service that also supported MUC would respond:</p>
  2503. <example caption="Service responds with Disco Info result showing MIX and MUC support" ><![CDATA[
  2504. <iq from='mix.shakespeare.example'
  2505. id='lx09df27'
  2506. to='hag66@shakespeare.example/UUID-c8y/1573'
  2507. type='result'>
  2508. <query xmlns=''>
  2509. <identity
  2510. category='conference'
  2511. name='Shakespearean Chat Service'
  2512. type='text'/>
  2513. <feature var='urn:xmpp:mix:1'/>
  2514. <feature var=''/>
  2515. <x xmlns='jabber:x:data' type='result'>
  2516. <field var='FORM_TYPE' type='hidden'>
  2517. <value>urn:xmpp:mix:1#serviceinfo</value>
  2518. </field>
  2519. </x>
  2520. </query>
  2521. </iq>
  2522. ]]></example>
  2523. <p>In the fully integrated service item discovery on the MIX/MUC service determines a list of channels. The protocol used for this is the same in MUC and MIX. Discovery actions on a channel in MIX MUST use 'node=mix' attribute in the discovery which will lead to the return of MIX channel specific information, as mandated for this discovery in MIX. If is not set, MUC room specific information is returned.
  2524. </p>
  2525. <p>For the partially integrated service, it will be useful for clients that support both MIX and MUC to be able to determine that the server supports both protocols. For a MIX client, it will be useful to know the MUC service, so that this information can be shared with a MUC client invitation. This information is provided by the initial service discovery:</p>
  2526. <example caption="MIX Service responds with Disco Info result sharing MUC service location" ><![CDATA[
  2527. <iq from='mix.shakespeare.example'
  2528. id='lx09df27'
  2529. to='hag66@shakespeare.example/UUID-c8y/1573'
  2530. type='result'>
  2531. <query xmlns=''>
  2532. <identity
  2533. category='conference'
  2534. name='Shakespearean Chat Service'
  2535. type='text'/>
  2536. <feature var='urn:xmpp:mix:1'/>
  2537. <x xmlns='jabber:x:data' type='result'>
  2538. <field var='FORM_TYPE' type='hidden'>
  2539. <value>urn:xmpp:mix:1#serviceinfo</value>
  2540. </field>
  2541. <field var='muc-mirror'
  2542. type='jid-single'
  2543. label='Location of MUC mirror service'>
  2544. <value>chat.shakespeare.example</value>
  2545. </field>
  2546. </x>
  2547. </query>
  2548. </iq>
  2549. ]]></example>
  2550. <p>The result is returned in an extended disco results in a form whose type value is 'urn:xmpp:mix:1#serviceinfo'. The field with var='muc-mirror' is the value of which is the mirrored MUC domain's JID. </p>
  2551. <p>Where a client supporting both MIX and MUC is given a reference to a MUC room, it is desirable that the client can determine the MIX channel and join using MIX. This is achieved by an equivalent extension to MUC service discover.</p>
  2552. <example caption="MUC Service responds with Disco Info result sharing MIX service location" ><![CDATA[
  2553. <iq from='chat.shakespeare.example'
  2554. id='lx09df27'
  2555. to='hag66@shakespeare.example/UUID-c8y/1573'
  2556. type='result'>
  2557. <query xmlns=''>
  2558. <identity
  2559. category='conference'
  2560. name='Shakespearean Chat Service'
  2561. type='text'/>
  2562. <feature var=''/>
  2563. <x xmlns='jabber:x:data' type='result'>
  2564. <field var='FORM_TYPE' type='hidden'>
  2565. <value>urn:xmpp:mix:1#serviceinfo</value>
  2566. </field>
  2567. <field var='mix-mirror'
  2568. type='jid-single'
  2569. label='Location of MUC mirror service'>
  2570. <value>mix.shakespeare.example</value>
  2571. </field>
  2572. </x>
  2573. </query>
  2574. </iq>
  2575. ]]></example>
  2576. <p>The result is returned in an extended disco results in a form whose type value is 'urn:xmpp:mix:1#serviceinfo'. The field with var='mix-mirror' is the value of which is the mirrored MIX domain's JID. </p>
  2577. <section2 topic="Choosing Which Invite to Send" anchor="mix-muc-invite-choice">
  2578. <p>
  2579. Where a client supports MUC and MIX and has determined that for a channel that the server also supports a MUC room, the client has a choice as to which type of invite to send. This SHOULD be done by determining if the client support MIX using the mechanism specified in
  2580. <link url='#mix-client-discovery'>Discovering Client MIX Capability</link>. If the client supports MIX a MIX invite SHOULD be sent.
  2581. </p>
  2582. </section2>
  2583. </section1>
  2584. <section1 topic="Capabilities not provided in MIX" anchor="not-included-from45">
  2585. <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>
  2586. <section2 topic="Password Controlled Channels" anchor="password-control">
  2587. <p>
  2588. &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.
  2589. </p>
  2590. </section2>
  2591. <section2 topic="Voice Control" anchor="voice-control">
  2592. <p>
  2593. &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.
  2594. </p>
  2595. </section2>
  2596. <section2 anchor="not-subject" topic="Subject">
  2597. <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>
  2598. <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>
  2599. </section2>
  2600. </section1>
  2601. <section1 topic='Internationalization Considerations' anchor='i18n'>
  2602. <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.
  2603. </p>
  2604. <p>Nicknames SHOULD be normalized using the "nickname" profile of the PRECIS OpaqueString class, as defined in &rfc7700;. </p>
  2605. </section1>
  2606. <section1 topic='Security Considerations' anchor='security'>
  2607. <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>
  2608. <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>
  2609. <p>
  2610. There is no MIX equivalent to &xep0045; password controlled rooms, which avoids a number of security issues.
  2611. </p>
  2612. <p>
  2613. MIX provides flexible access control options, which MUST be used in a manner appropriate to the security requirements of MIX users and services.
  2614. </p>
  2615. <p>
  2616. When converting a 1:1 conversation to a channel there is potential to expose sensitive information and to present invalid information.
  2617. </p>
  2618. </section1>
  2619. <section1 topic='IANA Considerations' anchor='iana'>
  2620. <p>None.</p>
  2621. </section1>
  2622. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  2623. <p>The urn:xmpp:mix namespace needs to be registered.</p>
  2624. </section1>
  2625. <section1 topic='XML Schema' anchor='schema'>
  2626. <p>To be supplied when MIX progresses to proposed standard.</p>
  2627. </section1>
  2628. <section1 topic='Acknowledgements' anchor='ack'>
  2629. <p>Thanks to the following who have made contributions: Dave Cridland, Tarun Gupta, Philipp Hancke, Waqas Hussain, Timothée Jaussoin, Evgeny Khramtsov, Georg Lukas, Tobias Markmann, Ralph Meijer, Edwin Mons, Emmanuel Gil Peyrot, Florian Schmaus, Lance Stout, Sam Whited, Jonas Wielicki, Matthew Wild and one anonymous reviewer.</p>
  2630. </section1>
  2631. </xep>