Skip to content

Commit 22fc785

Browse files
committed
XEP-0227: Add support for MUC export
1 parent f4c0273 commit 22fc785

File tree

1 file changed

+141
-1
lines changed

1 file changed

+141
-1
lines changed

xep-0227.xml

Lines changed: 141 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
<approver>Council</approver>
1717
<dependencies>
1818
<spec>XMPP IM</spec>
19+
<spec>XEP-0004</spec>
20+
<spec>XEP-0045</spec>
1921
<spec>XEP-0049</spec>
2022
<spec>XEP-0054</spec>
23+
<spec>XEP-0068</spec>
2124
</dependencies>
2225
<supersedes/>
2326
<supersededby/>
@@ -94,12 +97,16 @@
9497
<li>
9598
<p>All user data is stored, but no server configuration data.</p>
9699
<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>
97-
<p>Furthermore, the contents of MUC, Pubsub and other services are out of scope for this specification.</p>
100+
<p>Furthermore, the contents of Pubsub and other services are out of scope for this specification.</p>
98101
</li>
99102
<li>
100103
<p>Multiple virtual hosts are supported.</p>
101104
<p>Many server implementations can serve several hostnames in a single server instance. Thus this specification allows storing data from several virtual hosts.</p>
102105
</li>
106+
<li>
107+
<p>&xep0045; rooms are supported.</p>
108+
<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>
109+
</li>
103110
</ul>
104111
</section1>
105112

@@ -466,6 +473,129 @@
466473
]]></example>
467474

468475
</section2>
476+
477+
<section2 topic='Chat rooms' anchor='muc'>
478+
<p>A server MAY host a &xep0045; service, in which case it SHOULD be included in an export.</p>
479+
<p>This specification defines the &lt;room/&gt; element, with currently four extension points:</p>
480+
<ul>
481+
<li>The &lt;x/&gt; element, qualified by the 'http://jabber.org/protocol/muc#user' namespace, contains the affiliations of this room.</li>
482+
<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>
483+
<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</url>.</li>
484+
<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</url>.</li>
485+
</ul>
486+
487+
<example caption='The [email protected] room export'><![CDATA[
488+
<?xml version='1.0' encoding='UTF-8'?>
489+
<server-data xmlns='urn:xmpp:pie:0'>
490+
<host jid='chat.shakespeare.lit'>
491+
<room name='coven'>
492+
<x xmlns='http://jabber.org/protocol/muc#user'>
493+
<item jid='[email protected]' nick='firstwitch' affiliation='owner'/>
494+
<item jid='[email protected]' nick='secondwitch' affiliation='admin'/>
495+
</x>
496+
<query xmlns='http://jabber.org/protocol/muc#owner'>
497+
<x xmlns='jabber:x:data' type='submit'>
498+
<field var='FORM_TYPE'>
499+
<value>http://jabber.org/protocol/muc#roomconfig</value>
500+
</field>
501+
<field var='muc#roomconfig_roomname'>
502+
<value>A Dark Cave</value>
503+
</field>
504+
<field var='muc#roomconfig_roomdesc'>
505+
<value>The place for all good witches!</value>
506+
</field>
507+
<field var='muc#roomconfig_enablelogging'>
508+
<value>0</value>
509+
</field>
510+
<field var='muc#roomconfig_changesubject'>
511+
<value>1</value>
512+
</field>
513+
<field var='muc#roomconfig_allowinvites'>
514+
<value>0</value>
515+
</field>
516+
<field var='muc#roomconfig_allowpm'>
517+
<value>anyone</value>
518+
</field>
519+
<field var='muc#roomconfig_maxusers'>
520+
<value>10</value>
521+
</field>
522+
<field var='muc#roomconfig_publicroom'>
523+
<value>0</value>
524+
</field>
525+
<field var='muc#roomconfig_persistentroom'>
526+
<value>0</value>
527+
</field>
528+
<field var='muc#roomconfig_moderatedroom'>
529+
<value>0</value>
530+
</field>
531+
<field var='muc#roomconfig_membersonly'>
532+
<value>0</value>
533+
</field>
534+
<field var='muc#roomconfig_passwordprotectedroom'>
535+
<value>1</value>
536+
</field>
537+
<field var='muc#roomconfig_roomsecret'>
538+
<value>cauldronburn</value>
539+
</field>
540+
<field var='muc#roomconfig_whois'>
541+
<value>moderators</value>
542+
</field>
543+
<field var='muc#maxhistoryfetch'>
544+
<value>50</value>
545+
</field>
546+
<field var='muc#roomconfig_roomadmins'>
547+
<value>[email protected]</value>
548+
<value>[email protected]</value>
549+
</field>
550+
</x>
551+
</query>
552+
<archive xmlns='urn:xmpp:pie:0#mam'>
553+
<result xmlns='urn:xmpp:mam:2' id='78527-06716-51603'>
554+
<forwarded xmlns='urn:xmpp:forward:0'>
555+
<delay xmlns='urn:xmpp:delay' stamp='2002-10-13T23:58:37Z'/>
556+
<message xmlns="jabber:client"
557+
from='[email protected]/firstwitch'
558+
id='162BEBB1-F6DB-4D9A-9BD8-CFDCC801A0B2'
559+
type='groupchat'>
560+
<body>Thrice the brinded cat hath mew'd.</body>
561+
<x xmlns='http://jabber.org/protocol/muc#user'>
562+
<item affiliation='owner'
563+
564+
role='participant' />
565+
</x>
566+
</message>
567+
</forwarded>
568+
</result>
569+
<result xmlns='urn:xmpp:mam:2' id='34482-21985-73620'>
570+
<forwarded xmlns='urn:xmpp:forward:0'>
571+
<delay xmlns='urn:xmpp:delay' stamp='2002-10-13T23:58:43Z'/>
572+
<message xmlns="jabber:client"
573+
from='[email protected]/secondwitch'
574+
id='90057840-30FD-4141-AA44-103EEDF218FC'
575+
type='groupchat'>
576+
<body>Thrice and once the hedge-pig whined.</body>
577+
<x xmlns='http://jabber.org/protocol/muc#user'>
578+
<item affiliation='admin'
579+
580+
role='participant' />
581+
</x>
582+
</message>
583+
</forwarded>
584+
</result>
585+
</archive>
586+
<vCard xmlns='vcard-temp'>
587+
<PHOTO>
588+
<TYPE>image/png</TYPE>
589+
<BINVAL>
590+
Base64-encoded-avatar-file-here!
591+
</BINVAL>
592+
</PHOTO>
593+
</vCard>
594+
</room>
595+
</host>
596+
</server-data>
597+
]]></example>
598+
</section2>
469599
</section1>
470600

471601
<section1 topic='Use of XInclude' anchor='xinclude'>
@@ -589,6 +719,7 @@
589719
<xs:complexType>
590720
<xs:sequence>
591721
<xs:element ref='user' maxOccurs='unbounded'/>
722+
<xs:element ref='room' maxOccurs='unbounded'/>
592723
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
593724
</xs:sequence>
594725
<xs:attribute name='jid' type='xs:string' use='required'/>
@@ -614,6 +745,15 @@
614745
</xs:complexType>
615746
</xs:element>
616747
748+
<xs:element name='room'>
749+
<xs:complexType>
750+
<xs:sequence>
751+
<xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
752+
</xs:sequence>
753+
<xs:attribute name='name' type='xs:string' use='required'/>
754+
</xs:complexType>
755+
</xs:element>
756+
617757
</xs:schema>
618758
]]></code>
619759
</section1>

0 commit comments

Comments
 (0)