Skip to content

Commit

Permalink
XEP-0227: Add support for MUC export
Browse files Browse the repository at this point in the history
  • Loading branch information
linkmauve committed Feb 2, 2024
1 parent f4c0273 commit 8cc3870
Showing 1 changed file with 141 additions and 1 deletion.
142 changes: 141 additions & 1 deletion xep-0227.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
<approver>Council</approver>
<dependencies>
<spec>XMPP IM</spec>
<spec>XEP-0004</spec>
<spec>XEP-0045</spec>
<spec>XEP-0049</spec>
<spec>XEP-0054</spec>
<spec>XEP-0068</spec>
</dependencies>
<supersedes/>
<supersededby/>
Expand Down Expand Up @@ -94,12 +97,16 @@
<li>
<p>All user data is stored, but no server configuration data.</p>
<p>User data has similar form throughout the XMPP world, but server configuration is implementation-specific. Therefore this specification does not attempt to transfer any aspects of the server configuration from one server to another.</p>
<p>Furthermore, the contents of MUC, Pubsub and other services are out of scope for this specification.</p>
<p>Furthermore, the contents of Pubsub and other services are out of scope for this specification.</p>
</li>
<li>
<p>Multiple virtual hosts are supported.</p>
<p>Many server implementations can serve several hostnames in a single server instance. Thus this specification allows storing data from several virtual hosts.</p>
</li>
<li>
<p>&xep0045; rooms are supported.</p>
<p>Many servers offer a service for storing persistent rooms. This specification allows them to be defined in any virtual host, but some server software might apply additional restrictions.</p>
</li>
</ul>
</section1>

Expand Down Expand Up @@ -466,6 +473,129 @@
]]></example>

</section2>

<section2 topic='Chat rooms' anchor='muc'>
<p>A server MAY host a &xep0045; service, in which case it SHOULD be included in an export.</p>
<p>This specification defines the &lt;room/&gt; element, with currently four extension points:</p>
<ul>
<li>The &lt;x/&gt; element, qualified by the 'http://jabber.org/protocol/muc#user' namespace, contains the affiliations of this room.</li>
<li>The &lt;query/&gt; element, qualified by the 'http://jabber.org/protocol/muc#owner' namespace, contains the configuration of this room, in a data form (see &xep0004;) qualified by the 'http://jabber.org/protocol/muc#roomconfig' FORM_TYPE (see &xep0068;).</li>
<li>The &lt;archive/&gt; element, qualified by the 'urn:xmpp:pie:0#mam' namespace, contains the archives of this room, as defined in <link url='#archive'>the previous section</link>.</li>
<li>The &lt;vCard/&gt; element, qualified by the 'vcard-temp' namespace, contains exclusively the avatar of this room and its Content-Type, as defined in <link url='#vcards'>a previous section</link>.</li>
</ul>

<example caption='The [email protected] room export'><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<server-data xmlns='urn:xmpp:pie:0'>
<host jid='chat.shakespeare.lit'>
<room name='coven'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='[email protected]' nick='firstwitch' affiliation='owner'/>
<item jid='[email protected]' nick='secondwitch' affiliation='admin'/>
</x>
<query xmlns='http://jabber.org/protocol/muc#owner'>
<x xmlns='jabber:x:data' type='submit'>
<field var='FORM_TYPE'>
<value>http://jabber.org/protocol/muc#roomconfig</value>
</field>
<field var='muc#roomconfig_roomname'>
<value>A Dark Cave</value>
</field>
<field var='muc#roomconfig_roomdesc'>
<value>The place for all good witches!</value>
</field>
<field var='muc#roomconfig_enablelogging'>
<value>0</value>
</field>
<field var='muc#roomconfig_changesubject'>
<value>1</value>
</field>
<field var='muc#roomconfig_allowinvites'>
<value>0</value>
</field>
<field var='muc#roomconfig_allowpm'>
<value>anyone</value>
</field>
<field var='muc#roomconfig_maxusers'>
<value>10</value>
</field>
<field var='muc#roomconfig_publicroom'>
<value>0</value>
</field>
<field var='muc#roomconfig_persistentroom'>
<value>0</value>
</field>
<field var='muc#roomconfig_moderatedroom'>
<value>0</value>
</field>
<field var='muc#roomconfig_membersonly'>
<value>0</value>
</field>
<field var='muc#roomconfig_passwordprotectedroom'>
<value>1</value>
</field>
<field var='muc#roomconfig_roomsecret'>
<value>cauldronburn</value>
</field>
<field var='muc#roomconfig_whois'>
<value>moderators</value>
</field>
<field var='muc#maxhistoryfetch'>
<value>50</value>
</field>
<field var='muc#roomconfig_roomadmins'>
<value>[email protected]</value>
<value>[email protected]</value>
</field>
</x>
</query>
<archive xmlns='urn:xmpp:pie:0#mam'>
<result xmlns='urn:xmpp:mam:2' id='78527-06716-51603'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2002-10-13T23:58:37Z'/>
<message xmlns="jabber:client"
from='[email protected]/firstwitch'
id='162BEBB1-F6DB-4D9A-9BD8-CFDCC801A0B2'
type='groupchat'>
<body>Thrice the brinded cat hath mew'd.</body>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='owner'
jid='[email protected]'
role='participant' />
</x>
</message>
</forwarded>
</result>
<result xmlns='urn:xmpp:mam:2' id='34482-21985-73620'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2002-10-13T23:58:43Z'/>
<message xmlns="jabber:client"
from='[email protected]/secondwitch'
id='90057840-30FD-4141-AA44-103EEDF218FC'
type='groupchat'>
<body>Thrice and once the hedge-pig whined.</body>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='admin'
jid='[email protected]'
role='participant' />
</x>
</message>
</forwarded>
</result>
</archive>
<vCard xmlns='vcard-temp'>
<PHOTO>
<TYPE>image/png</TYPE>
<BINVAL>
Base64-encoded-avatar-file-here!
</BINVAL>
</PHOTO>
</vCard>
</room>
</host>
</server-data>
]]></example>
</section2>
</section1>

<section1 topic='Use of XInclude' anchor='xinclude'>
Expand Down Expand Up @@ -589,6 +719,7 @@
<xs:complexType>
<xs:sequence>
<xs:element ref='user' maxOccurs='unbounded'/>
<xs:element ref='room' maxOccurs='unbounded'/>
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute name='jid' type='xs:string' use='required'/>
Expand All @@ -614,6 +745,15 @@
</xs:complexType>
</xs:element>
<xs:element name='room'>
<xs:complexType>
<xs:sequence>
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute name='name' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>
</xs:schema>
]]></code>
</section1>
Expand Down

0 comments on commit 8cc3870

Please sign in to comment.