1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-30 21:22:15 -05:00

Merge branch 'xep0045' of https://github.com/ge0rg/xeps into feature/xep-0045

This commit is contained in:
Jonas Wielicki 2017-08-23 16:22:23 +02:00
commit c92813d007

View File

@ -45,6 +45,14 @@
</schemaloc> </schemaloc>
<registry/> <registry/>
&stpeter; &stpeter;
<revision>
<version>1.28</version>
<date>2017-05-31</date>
<initials>gl</initials>
<remark>
<p>Introduce &lt;x/&gt; tag in MUC-PMs to support better Carbon delivery.</p>
</remark>
</revision>
<revision> <revision>
<version>1.27.1</version> <version>1.27.1</version>
<date>2016-12-03</date> <date>2016-12-03</date>
@ -1903,6 +1911,8 @@
<section2 topic='Sending a Private Message' anchor='privatemessage'> <section2 topic='Sending a Private Message' anchor='privatemessage'>
<p>Since each occupant has its own occupant JID, an occupant can send a "private message" to a selected occupant via the service by sending a message to the intended recipient's occupant JID. The message type SHOULD be "chat" and MUST NOT be "groupchat", but MAY be left unspecified (i.e., a normal message). This privilege is controlled by the "muc#roomconfig_allowpm" room configuration option.</p> <p>Since each occupant has its own occupant JID, an occupant can send a "private message" to a selected occupant via the service by sending a message to the intended recipient's occupant JID. The message type SHOULD be "chat" and MUST NOT be "groupchat", but MAY be left unspecified (i.e., a normal message). This privilege is controlled by the "muc#roomconfig_allowpm" room configuration option.</p>
<p>To allow for proper synchronization of these messages to the user's other clients by &xep0280;, the sending client SHOULD add an &lt;x/&gt; element qualified by the 'http://jabber.org/protocol/muc#user' namespace to the message.</p>
<p><strong>Note:</strong> because this requirement was only added in revision 1.28 of this XEP, receiving entities MUST NOT rely on the existence of the &lt;x/&gt; element on private messages for proper processing.</p>
<example caption='Occupant Sends Private Message'><![CDATA[ <example caption='Occupant Sends Private Message'><![CDATA[
<message <message
from='wiccarocks@shakespeare.lit/laptop' from='wiccarocks@shakespeare.lit/laptop'
@ -1910,9 +1920,10 @@
to='coven@chat.shakespeare.lit/firstwitch' to='coven@chat.shakespeare.lit/firstwitch'
type='chat'> type='chat'>
<body>I'll give thee a wind.</body> <body>I'll give thee a wind.</body>
<x xmlns='http://jabber.org/protocol/muc#user' />
</message> </message>
]]></example> ]]></example>
<p>The service is responsible for changing the 'from' address to the sender's occupant JID and delivering the message to the intended recipient's full JID.</p> <p>The service is responsible for changing the 'from' address to the sender's occupant JID and delivering the message to the intended recipient's full JID. The service SHOULD add the &lt;x/&gt; element if the message does not contain it already.</p>
<example caption='Recipient Receives the Private Message'><![CDATA[ <example caption='Recipient Receives the Private Message'><![CDATA[
<message <message
from='coven@chat.shakespeare.lit/firstwitch' from='coven@chat.shakespeare.lit/firstwitch'
@ -1920,6 +1931,7 @@
to='crone1@shakespeare.lit/desktop' to='crone1@shakespeare.lit/desktop'
type='chat'> type='chat'>
<body>I'll give thee a wind.</body> <body>I'll give thee a wind.</body>
<x xmlns='http://jabber.org/protocol/muc#user' />
</message> </message>
]]></example> ]]></example>
<p>If the sender attempts to send a private message of type "groupchat" to a particular occupant, the service MUST refuse to deliver the message (since the recipient's client would expect in-room messages to be of type "groupchat") and return a &badrequest; error to the sender:</p> <p>If the sender attempts to send a private message of type "groupchat" to a particular occupant, the service MUST refuse to deliver the message (since the recipient's client would expect in-room messages to be of type "groupchat") and return a &badrequest; error to the sender:</p>