Skip to content

Commit 3327a64

Browse files
committed
Add ProtoXEP: Forums
This specification describes how to implement XMPP-based discussion forums.
1 parent 227fd89 commit 3327a64

File tree

2 files changed

+190
-0
lines changed

2 files changed

+190
-0
lines changed

inbox/forums.xml

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
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+
<xep>
8+
<header>
9+
<title>Forums</title>
10+
<abstract>This specification describes how to implement XMPP-based discussion forums.</abstract>
11+
&LEGALNOTICE;
12+
<number>xxxx</number>
13+
<status>ProtoXEP</status>
14+
<type>Standards Track</type>
15+
<sig>Standards</sig>
16+
<approver>Council</approver>
17+
<dependencies>
18+
<spec>XMPP Core</spec>
19+
<spec>XEP-0060</spec>
20+
<spec>XEP-0472</spec>
21+
</dependencies>
22+
<supersedes/>
23+
<supersededby/>
24+
<shortname>forums</shortname>
25+
<tags>
26+
<tag>Pubsub</tag>
27+
<tag>Pubsub Social Feed</tag>
28+
<tag>Forums</tag>
29+
</tags>
30+
&goffi;
31+
<revision>
32+
<version>0.0.1</version>
33+
<date>2025-10-14</date>
34+
<initials>jp</initials>
35+
<remark><p>First draft.</p></remark>
36+
</revision>
37+
</header>
38+
39+
<section1 topic='Introduction' anchor='intro'>
40+
<p>XMPP has offered more than instant messaging since its early days. It notably provides a powerful &xep0060; foundation, which serves as the basis for many features.</p>
41+
<p>Blogging is one such feature, initially implemented through direct use of &rfc4287; in Pubsub items, then via &xep0277;, and more recently with &xep0472;, a more generic basis for Atom-based features.</p>
42+
<p>While blogging is ideal for one-to-many communication, it’s not well-adapted to multi-party, topic-specific discussions. Forums have therefore been used in various forms since the early days of the Internet – from Usenet and mailing lists to web-based platforms.</p>
43+
<p>This specification describes how to implement forums with XMPP in a flexible way, allowing for feature-rich forums and the building of gateways to existing ones.</p>
44+
</section1>
45+
46+
<section1 topic="Requirements" anchor="reqs">
47+
<p>The design goals of this XEP are:</p>
48+
<ul>
49+
<li>Based on &xep0060; and compatible with pubsub-based features (&xep0470;, end-to-end encryption, etc).</li>
50+
<li>Support hierarchical organization of forums.</li>
51+
<li>Reuse existing specifications, notably Atom (&rfc4287;) via &xep0472; and &xep0496; for the optional hierarchy.</li>
52+
<li>Allow creation of the two main types of forums: Flat and Threaded.</li>
53+
<li>Flexible enough to build gateways to most common third-party forums.</li>
54+
</ul>
55+
</section1>
56+
57+
<section1 topic='Glossary' anchor='glossary'>
58+
<ul>
59+
60+
<li><strong>Forum</strong>: A themed grouping of discussions.</li>
61+
<li><strong>Topic</strong>: A discussion subject within a forum.</li>
62+
<li><strong>Replies</strong>: Messages posted in response to a topic.</li>
63+
<li><strong>Root Post</strong>: First message of a topic, to which other messages will reply.</li>
64+
<li><strong>Flat Forum</strong>: A forum where all replies to a topic are displayed chronologically in a single linear thread. While messages can reference and reply to other messages, they maintain their chronological order regardless of the reply hierarchy.</li>
65+
<li><strong>Threaded Forum</strong>: A forum where replies can be added to any message within a topic, creating nested reply structures that form multiple threads or continuations of existing threads.</li>
66+
</ul>
67+
</section1>
68+
69+
<section1 topic='Overview' anchor='overview'>
70+
<p>A forum is based on a node using one of the two dedicated &xep0472; profiles. This node items are the forum topics. Each topic has a comments node where replies can be posted.</p>
71+
<p>This specification describes two forum profiles for &xep0472;: one for flat forums, and one for threaded forums. The payload of those items uses Atom (&rfc4287;) via &xep0472;.</p>
72+
<p>Forums can be optionally organized in hierarchy using &xep0496;, allowing for better organisation and easier discovery.</p>
73+
<p>Advanced features such as reactions are implemented using &xep0470; and end-to-end encrypted forums are possible via standard pubsub e2ee specifications such as &xep0473;.</p>
74+
</section1>
75+
76+
<section1 topic='Forums Hierarchy' anchor='hierarchy'>
77+
<p>To organize the forums, a service can optionally have a hierarchy. This is done by using &xep0496;, which defines the 'parent' relationship used in this specification. The <em>pubsub#type</em> and <em>pubsub#title</em> refer to the configuration fields of a pubsub node as described at <link url="https://xmpp.org/extensions/xep-0060.html#owner-configure">XEP-0060 §8.2</link>.</p>
78+
79+
<p>Two types of nodes are used for the hierarchy: <em>root nodes</em> and <em>category nodes</em>.</p>
80+
81+
<section2 topic='Root Nodes' anchor='root-nodes'>
82+
<p>Root nodes serve as the entry point for forums.</p>
83+
<ul>
84+
<li>A root node MUST NOT have any parent and MUST have a <em>pubsub#type</em> set to 'urn:xmpp:forums:root:0'.</li>
85+
<li>This node MUST NOT have any items.</li>
86+
<li>If a service provides a single forum hierarchy without user-created hierarchies, it MUST use the well-known name 'urn:xmpp:forums:0' for its root node and MUST advertise the feature 'urn:xmpp:forums:0' in response to &xep0030; disco#info requests.</li>
87+
<li>In other cases (e.g., a generic pubsub service where users can create new forum hierarchies), any node name may be used; root nodes are then found by checking the value of the 'pubsub#type' attribute.</li>
88+
<li>Root nodes SHOULD have a <em>pubsub#title</em> set to explain what the forum hierarchy is about.</li>
89+
</ul>
90+
</section2>
91+
92+
<section2 topic='Category Nodes' anchor='category-nodes'>
93+
<p>Category nodes organize forums and function as folders containing other categories or forums.</p>
94+
<ul>
95+
<li>A category node MUST have a parent set to either a root node or another category node.</li>
96+
<li>Category depth may be arbitrary, but it is recommended to keep it low to avoid confusion from excessive subcategories.</li>
97+
<li>A category node MUST have a <em>pubsub#type</em> set to 'urn:xmpp:forums:category:0' and MUST NOT have any items.</li>
98+
<li>Category node names MUST follow the 'urn:xmpp:forums:category:0:&lt;UNIQUE ID&gt;' scheme, where '&lt;UNIQUE ID&gt;' is an identifier that MUST be unique across the service.</li>
99+
<li>A category node MUST have a <em>pubsub#title</em> set to a suitable label for the category, which will be displayed to end-users.</li>
100+
</ul>
101+
</section2>
102+
103+
<p>A client can find forum hierarchies by either checking the well-known node (if the service announces the feature 'urn:xmpp:forums:0' in response to &xep0030; disco#info requests) or by looking for nodes with the 'pubsub#type' attribute set to 'urn:xmpp:forums:root:0'. &xep0462; can be used in the later case if the pubsub service supports it.</p>
104+
</section1>
105+
106+
<section1 topic="Forums Profiles" anchor="profiles">
107+
<p>Forums are based on &xep0472;. Two profiles are defined: one for flat forums and one for threaded forums. In both cases, a forum consists of a forum node in which each item consists of a root post. Each root post MUST:</p>
108+
<ul>
109+
<li>include a &lt;title&gt; element (the topic title) as defined in &rfc4287;;</li>
110+
<li>include a &lt;content&gt; element (the topic root post) as defined in &rfc4287;;</li>
111+
<li>include a single comments node (as specified in <link url="https://xmpp.org/extensions/xep-0277.xml#comments">XEP-0277 §3 Comments</link>), where replies are published.</li>
112+
</ul>
113+
<p>The organization of replies depends on the forum type.</p>
114+
<section2 topic="Flat Forums" anchor="flat-forums">
115+
<ul>
116+
<li>Flat forums MUST set the 'pubsub#type' to "urn:xmpp:pubsub-social-feed:flat-forums:0".</li>
117+
<li>All replies MUST be posted to the comments node of the root post.</li>
118+
<li>A reply MAY reference another reply by using a &lt;in-reply-to/&gt; element as specified in <link url="https://xmpp.org/extensions/xep-0472.html#reply">XEP-0472 §4.4 Replying to a Post</link>.</li>
119+
</ul>
120+
<p>With this profile, the XMPP client knows that the view is flat, and can detect the links between replies with the &lt;in-reply-to/&gt; element, and show them with whatever user interface is appropriate.</p>
121+
</section2>
122+
<section2 topic="Threaded Forums" anchor="threaded-forums">
123+
<ul>
124+
<li>Threaded forums MUST set the 'pubsub#type' to "urn:xmpp:pubsub-social-feed:threaded-forums:0".</li>
125+
<li>All published replies MUST link to a comments node (which can be created in advance, or automatically if the pubsub service supports auto-create as specified in <link url="https://xmpp.org/extensions/xep-0060.html#publisher-publish-autocreate">XEP-0060 §7.1.4 Automatic Node Creation</link>).</li>
126+
<li>All replies MUST be posted to the comments node of the items they are replying to.</li>
127+
<li>The &lt;in-reply-to/&gt; element as specified in <link url="https://xmpp.org/extensions/xep-0472.html#reply">XEP-0472 §4.4 Replying to a Post</link> MUST NOT be used.</li>
128+
</ul>
129+
<p>With this profile, the XMPP client knows that the view is a tree-like view of nested threads.</p>
130+
</section2>
131+
</section1>
132+
133+
<section1 topic='Business Rules' anchor='rules'>
134+
<p>In forums, publications can often be edited, and with &xep0060; alone, this will overwrite the old item with a new one, causing it to appear before items published later. However, for forums we often want chronological order; this can be achieved by using &xep0413; to order by date of creation.</p>
135+
<p>Forums (i.e., the nodes with one of the two profiles defined in <link url="#profiles">Forums Profiles</link>) can have no parent (mostly used in pubsub services which do not support &xep0496;), have a category node as parent, or have a root node as parent. They can also be siblings to category nodes (i.e., have the same parent as a category node) if it makes sense for them to appear at the same level as some categories.</p>
136+
<p>Root posts must include both a &lt;title&gt; and a &lt;content&gt; element. Replies may include both a &lt;title&gt; and a &lt;content&gt; (where the &lt;title&gt; serves as the reply's title), or only a &lt;title&gt; (which will be used as the body, resulting in a reply without a distinct title). The XMPP client determines whether to require a title for replies.</p>
137+
</section1>
138+
139+
<section1 topic='Discovering Support' anchor='disco'>
140+
<p>Forums can be created on a generic pubsub service, in which case no forums-specific discovery feature is advertised. A client can discover a forum by looking for root nodes (i.e., nodes with the type "urn:xmpp:forums:root:0") if the server supports &xep0496;. Otherwise, the client can look directly for forums profiles as defined in <link url="#profiles">Forums Profiles</link>. In both cases, &xep0462; can be used to make discovery easier, if the pubsub service supports it.</p>
141+
<p>If a service has a built-in forums support (e.g., a gateway to an existing forum), it MUST advertise it by including the "urn:xmpp:forums:0" discovery feature in response to a &xep0030; information request:</p>
142+
143+
<example caption="Service Discovery information request"><![CDATA[
144+
<iq type='get'
145+
from='[email protected]/balcony'
146+
to='forums.example.org'
147+
id='disco1'>
148+
<query xmlns='http://jabber.org/protocol/disco#info'/>
149+
</iq>]]></example>
150+
<example caption="Service Discovery information response"><![CDATA[
151+
<iq type='result'
152+
from='forums.example.org'
153+
to='[email protected]/balcony'
154+
id='disco1'>
155+
<query xmlns='http://jabber.org/protocol/disco#info'>
156+
...
157+
<feature var='urn:xmpp:forums:0'/>
158+
...
159+
</query>
160+
</iq>]]></example>
161+
<p>In this case the service MUST have a root node with the well-known name "urn:xmpp:forums:0" and MUST implement &xep0496;.</p>
162+
</section1>
163+
164+
<section1 topic="Security Considerations" anchor="security">
165+
<p>There are many inherent risks in using forums, primarily depending on their public visibility and popularity. Forum services should implement robust moderation tools and monitor content for spam, aggressive behavior, inappropriate content, bullying, sexism, racism, and other toxic behavior.</p>
166+
<p>General security considerations related to PubSub services apply, notably impersonation risks (which can be mitigated by services supporting the 'publisher' attribute and the use of &xep0475;), attacks such as excessive node or item creation, and so forth.</p>
167+
</section1>
168+
169+
<section1 topic="IANA Considerations" anchor="iana">
170+
<p>This document does not require interaction with &IANA;.</p>
171+
</section1>
172+
173+
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
174+
<p>TODO</p>
175+
</section1>
176+
177+
<section1 topic='XML Schema' anchor='schema'>
178+
<p>TODO</p>
179+
</section1>
180+
181+
</xep>

xep.ent

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,15 @@ IANA Service Location Protocol, Version 2 (SLPv2) Templates</link></span> <note>
11941194
<jid>[email protected]</jid>
11951195
</author>
11961196
" >
1197+
<!ENTITY goffi "
1198+
<author>
1199+
<firstname>Jérôme</firstname>
1200+
<surname>Poisson</surname>
1201+
<email>[email protected]</email>
1202+
<jid>[email protected]</jid>
1203+
<uri>https://www.goffi.org</uri>
1204+
</author>
1205+
">
11971206

11981207
<!-- XMPP Extension Protocols -->
11991208

0 commit comments

Comments
 (0)