1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 10:12:19 -05:00

Merge branch 'xep-0472' into premerge

This commit is contained in:
Jonas Schäfer 2022-12-27 20:39:39 +01:00
commit fe6d4908b9

View File

@ -6,7 +6,7 @@
<?xml-stylesheet type='text/xsl' href='xep.xsl'?> <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep> <xep>
<header> <header>
<title>PubSub Social Feed</title> <title>Pubsub Social Feed</title>
<abstract>This specification defines a way of publishing social content over XMPP.</abstract> <abstract>This specification defines a way of publishing social content over XMPP.</abstract>
&LEGALNOTICE; &LEGALNOTICE;
<number>0472</number> <number>0472</number>
@ -32,12 +32,24 @@
<jid>edhelas@movim.eu</jid> <jid>edhelas@movim.eu</jid>
<uri>https://edhelas.movim.eu</uri> <uri>https://edhelas.movim.eu</uri>
</author> </author>
<revision> <revision>
<version>0.1.0</version> <version>0.1.1</version>
<date>2022-12-13</date> <date>2022-12-24</date>
<initials>XEP Editor (jsc)</initials> <initials>tj</initials>
<remark>Accepted by vote of Council on 2022-10-19.</remark> <remark>
</revision> <ul>
<li>Change the specified pubsub#type profiles to be more consistent</li>
<li>Rephrase some paragraphs</li>
<li>Fix examples formating</li>
</ul>
</remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2022-12-13</date>
<initials>XEP Editor (jsc)</initials>
<remark>Accepted by vote of Council on 2022-10-19.</remark>
</revision>
<revision> <revision>
<version>0.0.1</version> <version>0.0.1</version>
<date>2022-09-26</date> <date>2022-09-26</date>
@ -47,9 +59,9 @@
</header> </header>
<section1 topic='Introduction' anchor='intro'> <section1 topic='Introduction' anchor='intro'>
<p>Social Networking plaftorms are often built around the concept of feeds. XMPP offers, through &xep0060;, a really generic way of Publishing and Subscribing elements on XMPP nodes. This extension defines a way to publish social content on PubSub nodes using &rfc4287;</p> <p>Social Networking plaftorms are often built around the concept of feeds. XMPP offers, through &xep0060;, a really generic way of Publishing and Subscribing elements on XMPP nodes. This extension defines a way to publish social content on Pubsub nodes using &rfc4287;</p>
<p>Social features in XMPP were historically built on the &xep0277; specifications. However in practice Microblogging was not applicable in more common cases and some related features were not used. The current XEP defines a more generic way of handling Social Feeds on XMPP by keeping the existing Microblogging features as a subset of it.</p> <p>Social features in XMPP were historically built on the &xep0277; specifications. However, in practice, Microblogging was not clearly defined in more common cases such as on generic Pubsub nodes and it was not easy to differentiate social nodes from the other ones. The current XEP defines a more generic way of handling Social Feeds on XMPP by declaring a secific pubsub#type for those Pubsub nodes and by keeping &xep0277; as a subset of it.</p>
</section1> </section1>
<section1 topic='Glossary' anchor='glossary'> <section1 topic='Glossary' anchor='glossary'>
@ -68,7 +80,7 @@
<section1 topic='Protocol' anchor='protocol'> <section1 topic='Protocol' anchor='protocol'>
<section2 topic='Location' anchor='location'> <section2 topic='Location' anchor='location'>
<p> <p>
A PubSub Social Feed can be located on any PubSub node on the XMPP network. Some specific use cases, such as the personal eventing (PEP) node Microblog is defined in the A Pubsub Social Feed can be located on any Pubsub node on the XMPP network. Some specific use cases, such as the personal eventing (PEP) node Microblog is defined in the
<link url="#profiles">Profiles</link> <link url="#profiles">Profiles</link>
section. section.
</p> </p>
@ -77,8 +89,7 @@
<section2 topic='Publishing a Post' anchor='publish'> <section2 topic='Publishing a Post' anchor='publish'>
<p>The publication of a Post consist of a valid &rfc4287; entry embeded in a &xep0060; item.</p> <p>The publication of a Post consist of a valid &rfc4287; entry embeded in a &xep0060; item.</p>
<p>The post content itself can be either text (content element without "type" attribute or with "type" attribute with "text" value) or XHTML ("content" element "type" attribute with "xhtml" value). If Romeo publishes XHTML content, his client MUST publish two "content" elements: a text one, and a XHTML one. For XHTML publishing, see &xep0060;.</p> <p>The post content itself can be either text (content element without "type" attribute or with "type" attribute with "text" value) or XHTML ("content" element "type" attribute with "xhtml" value). If Romeo publishes XHTML content, his client MUST publish two "content" elements: a text one, and a XHTML one. For XHTML publishing, see &xep0060;.</p>
<example caption="Publishing a post"> <example caption="Publishing a post"><![CDATA[
<![CDATA[
<iq from='romeo@montague.lit/pda' <iq from='romeo@montague.lit/pda'
id='pub1' id='pub1'
to='new.montague.lit' to='new.montague.lit'
@ -96,13 +107,11 @@
</publish> </publish>
</pubsub> </pubsub>
</iq> </iq>
]]> ]]></example>
</example>
<p>Note: The "title" element is required to be included in an "atom:entry" element according to &rfc4287;. An implementation MAY provide also "atom:summary" and/or "atom:content" elements too if it needs.</p> <p>Note: The "title" element is required to be included in an "atom:entry" element according to &rfc4287;. An implementation MAY provide also "atom:summary" and/or "atom:content" elements too if it needs.</p>
<section3 topic="Publishing a Post with Rich Content" anchor="rich_content"> <section3 topic="Publishing a Post with Rich Content" anchor="rich_content">
<p>It's possible to insert some rich content in the post or comment. It can be some text formatting, images, etc. Only "xhtml" content type is supported for the moment by this document but possibly it will be extended later. Also, it is RECOMMENDED for the client to restrict XHTML content to the XHTML-IM subset (&xep0071;).</p> <p>It's possible to insert some rich content in the post. It can be some text formatting, images, etc. Only "xhtml" content type is supported for the moment by this document but possibly it will be extended later.</p>
<example caption="Publishing a post with rich content"> <example caption="Publishing a post with rich content"><![CDATA[
<![CDATA[
<iq from='romeo@montague.lit/pda' <iq from='romeo@montague.lit/pda'
id='pub2' id='pub2'
to='news.montague.lit' to='news.montague.lit'
@ -125,18 +134,16 @@
</publish> </publish>
</pubsub> </pubsub>
</iq> </iq>
]]> ]]></example>
</example>
</section3> </section3>
</section2> </section2>
<section2 topic='Receiving a Post' anchor='receive'> <section2 topic='Receiving a Post' anchor='receive'>
<p> <p>
Because Juliet is subscribed to some Romeo's family PubSub service nodes. Romeo's XMPP server will send a PubSub notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with Jabber clients that are not pubsub-capable (see Because Juliet is subscribed to some Romeo's family Pubsub service nodes. Romeo's XMPP server will send a Pubsub notification to Juliet. The notification can include an XMPP message body for backwards-compatibility with Jabber clients that are not pubsub-capable (see
<link url="#body">Message Body</link> <link url="#body">Message Body</link>
). ).
</p> </p>
<example caption="Receiving a post"> <example caption="Receiving a post"><![CDATA[
<![CDATA[
<message from='news.montague.lit' <message from='news.montague.lit'
to='juliet@capulet.lit' to='juliet@capulet.lit'
type='headline'> type='headline'>
@ -160,16 +167,14 @@
</items> </items>
</event> </event>
</message> </message>
]]> ]]></example>
</example>
<p>Note: these alternate links were not posted by the original client because some clients can't compute them themselves. These things SHOULD be inserted at server side though.</p> <p>Note: these alternate links were not posted by the original client because some clients can't compute them themselves. These things SHOULD be inserted at server side though.</p>
</section2> </section2>
<section2 topic='Replying to a Post' anchor='reply'> <section2 topic='Replying to a Post' anchor='reply'>
<p>Anyone can publish a post in reply to Romeo's post. Here we assume that a reply comes from Benvolio.</p> <p>Anyone can publish a post in reply to Romeo's post. Here we assume that a reply comes from Benvolio.</p>
<p>Note: Inclusion of the "thr:in-reply-to" element defined in &rfc4685; indicates the post to which the user is replying. This reply includes two such elements (one pointing to the HTTP URL for the post and the other pointing to the XMPP URI for the post.</p> <p>Note: Inclusion of the "thr:in-reply-to" element defined in &rfc4685; indicates the post to which the user is replying. This reply includes two such elements (one pointing to the HTTP URL for the post and the other pointing to the XMPP URI for the post.</p>
<p>Note: The post can be a reply to more than the only one another.</p> <p>Note: The post can be a reply to more than the only one another.</p>
<example caption="Publishing a reply"> <example caption="Publishing a reply"><![CDATA[
<![CDATA[
<iq from='benvolio@montague.lit/mobile' <iq from='benvolio@montague.lit/mobile'
id='uv2x37s5' id='uv2x37s5'
to='news.montague.lit' to='news.montague.lit'
@ -206,15 +211,13 @@
</publish> </publish>
</pubsub> </pubsub>
</iq> </iq>
]]> ]]></example>
</example>
<p>Assuming that Romeo has also subscribed to the same node he will receive the reply that Benvolio sent.</p> <p>Assuming that Romeo has also subscribed to the same node he will receive the reply that Benvolio sent.</p>
</section2> </section2>
<section2 topic='Repeating a Post' anchor='repeat'> <section2 topic='Repeating a Post' anchor='repeat'>
<p>When Benvolio wants to repeat a Romeo's post, his client publishes the same post under a different name. But to be able to track the repeated post original author, Benvolio's client MAY use specific "atom:author" child node, "atom:name" and "atom:uri", containing, respectively, the name of the original post author, and his XMPP URI (JID).</p> <p>When Benvolio wants to repeat a Romeo's post, his client publishes the same post under a different name. But to be able to track the repeated post original author, Benvolio's client MAY use specific "atom:author" child node, "atom:name" and "atom:uri", containing, respectively, the name of the original post author, and his XMPP URI (JID).</p>
<p>The client SHOULD also put an "atom:link" element with "rel" attribute set to "via" and point it to the original post.</p> <p>The client SHOULD also put an "atom:link" element with "rel" attribute set to "via" and point it to the original post.</p>
<example caption="Repeating a Post"> <example caption="Repeating a Post"><![CDATA[
<![CDATA[
<iq from='benvolio@montague.lit/mobile' <iq from='benvolio@montague.lit/mobile'
id='pub2' id='pub2'
to='news.montague.lit' to='news.montague.lit'
@ -257,52 +260,47 @@
<p>Note that the rules of comparing, building and security notes for "atom:id" are listed in the &rfc4287;.</p> <p>Note that the rules of comparing, building and security notes for "atom:id" are listed in the &rfc4287;.</p>
</section3> </section3>
<section3 topic='Message Body' anchor='body'> <section3 topic='Message Body' anchor='body'>
<p>Depending on service policies and the value of the "pubsub#include_body" node configuration option, PubSub Social Feed notifications SHOULD include a message "body" element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the "body" element to be the same as that of the "atom:title" child of the "atom:entry".</p> <p>Depending on service policies and the value of the "pubsub#include_body" node configuration option, Pubsub Social Feed notifications SHOULD include a message "body" element for backwards-compatibility with Jabber clients that are not pubsub-capable. It is RECOMMENDED for the XML character value of the "body" element to be the same as that of the "atom:title" child of the "atom:entry".</p>
</section3> </section3>
<section3 topic='Geotagging' anchor='geotagging'> <section3 topic='Geotagging' anchor='geotagging'>
<p>Juliet may want to know which places are Romeo's notices related to. That's why Romeo's client MAY geotag microblog entries, using the &xep0080; protocol for storing geolocation information.</p> <p>Juliet may want to know which places are Romeo's notices related to. That's why Romeo's client MAY geotag microblog entries, using the &xep0080; protocol for storing geolocation information.</p>
<p>Romeo's client MUST create a "geoloc" element, with the &xep0080; reference namespace: "http://jabber.org/protocol/geoloc".</p> <p>Romeo's client MUST create a "geoloc" element, with the &xep0080; reference namespace: "http://jabber.org/protocol/geoloc".</p>
<example caption="Geotagging a Post"> <example caption="Geotagging a Post"><![CDATA[
<![CDATA[ <iq from='romeo@montague.lit/mobile'
<iq from='romeo@montague.lit/mobile' id='pub7'
id='pub7' to='romeo@montague.lit'
to='romeo@montague.lit' type='set'>
type='set'> <pubsub xmlns='http://jabber.org/protocol/pubsub'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'> <publish node='urn:xmpp:microblog:0'>
<publish node='urn:xmpp:microblog:0'> <item id='1zr23z8a-3g12-34fh-750b-120867gjc1sqh'>
<item id='1zr23z8a-3g12-34fh-750b-120867gjc1sqh'> <entry xmlns='http://www.w3.org/2005/Atom'>
<entry xmlns='http://www.w3.org/2005/Atom'> <author>
<author> <name>Romeo Montague</name>
<name>Romeo Montague</name> <uri>xmpp:romeo@montague.lit</uri>
<uri>xmpp:romeo@montague.lit</uri> </author>
</author> <title type='text'>Is lost in the forest. Need help!</title>
<title type='text'>Is lost in the forest. Need help!</title> <id>tag:montague.lit,2008-05-08:posts-1zr23z8a-3g12-34fh-750b-120867gjc1sqh</id>
<link rel='replies' <published>2008-05-08T18:43:01Z</published>
title='comments' <updated>2008-05-08T18:43:01Z</updated>
href='xmpp:pubsub.montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%2F36ec6dfe61e52b1e2cdb248823520233'/> <geoloc xmlns="http://jabber.org/protocol/geoloc">
<id>tag:montague.lit,2008-05-08:posts-1zr23z8a-3g12-34fh-750b-120867gjc1sqh</id> <lat>48.171761</lat>
<published>2008-05-08T18:43:01Z</published> <lon>-3.3667986</lon>
<updated>2008-05-08T18:43:01Z</updated> <country>France</country>
<geoloc xmlns="http://jabber.org/protocol/geoloc"> <countrycode>FR</countrycode>
<lat>48.171761</lat> <region>Brittany</region>
<lon>-3.3667986</lon> </geoloc>
<country>France</country> </entry>
<countrycode>FR</countrycode> </item>
<region>Brittany</region> </publish>
</geoloc> </pubsub>
</entry> </iq>
</item> ]]></example>
</publish>
</pubsub>
</iq>
]]>
</example>
</section3> </section3>
</section2> </section2>
</section1> </section1>
<section1 topic="Profiles" anchor="profiles"> <section1 topic="Profiles" anchor="profiles">
<p>PubSub Social feeds are specified under profiles. Those profiles are constraints applied to nodes and defined by a specific PubSub type (see &xep0060;#registrar-formtypes-metadata)</p> <p>Pubsub Social feeds are specified under profiles. Those profiles are constraints applied to nodes and defined by a specific Pubsub type (see &xep0060;#registrar-formtypes-metadata)</p>
<p> <p>
All the profiles MUST base their default configuration on the All the profiles MUST base their default configuration on the
<link url="#profile_base">Base profile</link> <link url="#profile_base">Base profile</link>
@ -310,50 +308,35 @@
</p> </p>
<section2 topic="Base profile" anchor="profile_base"> <section2 topic="Base profile" anchor="profile_base">
<p>This profile is specified by the PubSub type `urn:xmpp:social:0` and define a generic PubSub Social Feed that can be hosted on any PubSub service node or &xep0163; node.</p> <p>This profile is specified by the Pubsub type "urn:xmpp:pubsub-social-feed:0" and define a generic Pubsub Social Feed that can be hosted on any Pubsub service node or &xep0163; node.</p>
<p>Those restrictions MUST be used by all the other profiles defined bellow and in other XEPs based on Pubsub Social Feed.</p> <p>Those restrictions MUST be used by all the other profiles defined bellow and in other XEPs based on Pubsub Social Feed.</p>
<section3 topic="Pubsub Node Configuration" anchor="profile_base_node_config"> <section3 topic="Pubsub Node Configuration" anchor="profile_base_node_config">
<ol> <ol>
<li>The "pubsub#notify_retract" MUST be set to `true` to provide clients the ability to track if some items were retracted and reflect such changes in the UI correctly.</li> <li>The "pubsub#notify_retract" MUST be set to "true" to provide clients the ability to track if some items were retracted and reflect such changes in the UI correctly.</li>
<li>The "pubsub#max_items" MUST be set to the `max` value, as defined in the &xep0060;.</li> <li>The "pubsub#max_items" MUST be set to the "max" value, as defined in the &xep0060;.</li>
<li>The "pubsub#persist_items" MUST be set to `true`.</li> <li>The "pubsub#persist_items" MUST be set to "true".</li>
<li>The "pubsub#send_last_published_item" SHOULD be set to `never`.</li> <li>The "pubsub#send_last_published_item" SHOULD be set to "never".</li>
<li>The "pubsub#deliver_payloads" SHOULD be set to `false`. The social content can be quite large so it is advised to let the clients to manually query the content if it is not already cached.</li> <li>The "pubsub#deliver_payloads" SHOULD be set to "false". The social content can be quite large so it is advised to let the clients to manually query the content if it is not already cached.</li>
</ol> </ol>
</section3> </section3>
</section2> </section2>
<section2 topic="Microblog profile" anchor="profile_microblog"> <section2 topic="Microblog profile" anchor="profile_microblog">
<p>This profile is defined by the PubSub type `urn:xmpp:microblog:0` as defined in &xep0277; and MUST be created and configured under the PEP `urn:xmpp:microblog:0` node.</p> <p>This profile is defined by the Pubsub type "urn:xmpp:microblog:0" as defined in &xep0277; and MUST be created and configured under the PEP "urn:xmpp:microblog:0" node.</p>
</section2>
<section3 topic="Pubsub Node Configuration" anchor="profile_microblog_node_config"> <section2 topic="Gallery profile" anchor="profile_gallery">
<p> <p>This profile is defined by the Pubsub type "urn:xmpp:pubsub-social-gallery:0" and can be hosted on any Pubsub service.</p>
On top of the <p>All the items published in a gallery node MUST only have at least one attached picture. This picture MUST be of type "enclosure" as specified in &rfc4287;.</p>
<link url="#profile_base_node_config">Base profile Pubsub Node Configuration</link> <example caption="An Atom attached picture"><![CDATA[
the following node configuration is applied: <link rel='enclosure' href='https://capulet.lit/upload/romeo.jpg' type='image/jpeg' title='Romeo Portrait'/>
</p> ]]></example>
<ol> </section2>
<li>The "pubsub#access_model" SHOULD be set to `presence` by default to allow the other presence JIDs to receive the newly published elements without an explicit subscription (using the +notify feature of &xep0163;).</li>
</ol>
</section3>
</section2>
<section2 topic="Gallery profile" anchor="profile_gallery">
<p>This profile is defined by the PubSub type `urn:xmpp:gallery:0` and can be hosted on any PubSub service.</p>
<p>All the items published in a gallery node MUST only have at least one attached picture. This picture MUST be of type `enclosure` as specified in &rfc4287;.</p>
<example caption="An Atom attached picture">
<![CDATA[
<link rel='enclosure' href='https://capulet.lit/upload/romeo.jpg' type='image/jpeg' title='Romeo Portrait'/>
]]>
</example>
</section2>
</section1> </section1>
<section1 topic='Security Considerations' anchor='security'> <section1 topic='Security Considerations' anchor='security'>
<section2 topic='Comment Author' anchor='comment_author'> <p>There are no security features or concerns related to this proposal.</p>
<p>The client SHOULD check that the comment author information (provided in the "author" element) is valid, by checking that the "publisher" item attribute value matches the "uri" element value. If there is a difference or the check can not be performed because there was not a "publisher" attribute included, the comment can be displayed, but it is RECOMMENDED to specify there is a security problem.</p>
</section2>
</section1> </section1>
<section1 topic='IANA Considerations' anchor='iana'> <section1 topic='IANA Considerations' anchor='iana'>
@ -372,4 +355,4 @@
</p> </p>
</section1> </section1>
</xep> </xep>