1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-28 12:12:22 -05:00

Clarifications of Participant Server Behaviour

This commit is contained in:
Steve Kille 2017-01-27 15:47:39 +00:00 committed by Sam Whited
parent 30cd35b610
commit 68f128e7ec

View File

@ -2092,14 +2092,78 @@ A client creates a channel by sending a simple request to the MIX service. A c
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. The participant's server will simply send on the messages from the channel to each of the user's clients which have activated the channel. If there are no clients activated, the message is dropped. 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. The participant's server will simply send on the messages from the channel to each of the user's clients which have activated the channel. If there are no clients activated, the message is dropped.
</p> </p>
<p> <p>
Messages sent to the participant's sever will always be addressed to the user's bare JID. The participants 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. Messages sent to the participant's sever will always be addressed to the user's bare JID. The participants 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 participants server with the participant's bare JID.
</p> </p>
<example caption="Channel Reflects Message to Participants"><![CDATA[
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
<nick xmlns='urn:xmpp:mix:0'>thirdwitch</nick>
<jid xmlns='urn:xmpp:mix:0'>coven+123456@mix.shakespeare.example</jid>
</message>
]]></example>
<p>
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.
</p>
<example caption="Participant's Server Sends Modified Message to two Clients"><![CDATA[
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example/pda3'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
<nick xmlns='urn:xmpp:mix:0'>thirdwitch</nick>
<jid xmlns='urn:xmpp:mix:0'>coven+123456@mix.shakespeare.example</jid>
</message>
<message from='coven@mix.shakespeare.example'
to='hecate@shakespeare.example/desktop'
id='77E07BB0-55CF-4BD4-890E-3F7C0E686BBD'
type='groupchat'>
<body>Harpier cries: 'tis time, 'tis time.</body>
<nick xmlns='urn:xmpp:mix:0'>thirdwitch</nick>
<jid xmlns='urn:xmpp:mix:0'>coven+123456@mix.shakespeare.example</jid>
</message>
]]></example>
</section2> </section2>
<section2 topic="Messages To MIX Channels" anchor="mix-to"> <section2 topic="Messages To MIX Channels" anchor="mix-to">
<p> <p>
The MIX specification requires that some messages MUST or MAY come from the participant's server, and that the MIX client sends these messages to the local server rather than directly to the MIX channel. 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.
This enables the participant's server to use information from the client to improve the service provided to the client. The client addresses these messages by sending them to the user's own bare JID, indicating the channel with the channel attribute. This is illustrated below. </p>
</section2>
<section2 topic="IQ Support on Local Server" anchor="mix-diso">
<p>
The MIX specification requires that some IQ messages MUST or MAY come from the participant's server, and not directly from the client.
This indirect operation enables the participant's server to use information from the client to improve the service provided to the client.
The following table shows which IQs are direct from client, indirect through the local server or may be either.
</p>
<table caption="IQ Direct vs Indirect">
<tr><th>Action</th><th>Direct or Indirect</th></tr>
<tr><td>MIX Service Discovery</td><td>Direct</td></tr>
<tr><td>MIX Service Information Discovery</td><td>Direct</td></tr>
<tr><td>MIX Channel Discovery</td><td>Either</td></tr>
<tr><td>Discovering Channel Information</td><td>Indirect</td></tr>
<tr><td>Discovering Channel Nodes</td><td>Indirect</td></tr>
<tr><td>Determining Channel Information from Information Node</td><td>Either</td></tr>
<tr><td>Determining Channel Participants</td><td>Either</td></tr>
<tr><td>Joining a Channel</td><td>Indirect</td></tr>
<tr><td>Preference Setting</td><td>Indirect</td></tr>
<tr><td>Leaving MIX Channel</td><td>Indirect</td></tr>
<tr><td>Nick Setting</td><td>Indirect</td></tr>
<tr><td>Nick Registration</td><td>Indirect</td></tr>
</table>
<p>
The rest of this section describes how indirect discovery is achieved, using channel join as an example.
The client addresses indirect messages to the user's own bare JID, indicating the channel with the channel attribute. This is illustrated below.
</p> </p>
<example caption="Client sends request to local server to Join a MIX Channel"><![CDATA[ <example caption="Client sends request to local server to Join a MIX Channel"><![CDATA[
@ -2118,7 +2182,7 @@ A client creates a channel by sending a simple request to the MIX service. A c
</iq> </iq>
]]></example> ]]></example>
<p>This is then modified by the local server and sent to the MIX channel as shown earlier in the core MIX specification. This is shown again in the following example. </p> <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>
<example caption="Participant's Server sends Join to MIX Channel"><![CDATA[ <example caption="Participant's Server sends Join to MIX Channel"><![CDATA[
<iq type='set' <iq type='set'
@ -2135,7 +2199,9 @@ A client creates a channel by sending a simple request to the MIX service. A c
</iq> </iq>
]]></example> ]]></example>
<p>
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.
</p>
</section2> </section2>