1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

Added the ability to publish comments on an attachement.

This commit is contained in:
Vanaryon 2011-04-26 11:23:55 +02:00 committed by stpeter
parent ec0e814de0
commit eccfd96f7a

View File

@ -27,7 +27,13 @@
<jid>vanaryon@jappix.com</jid>
<uri>http://vanaryon.eu/</uri>
</author>
<revision>
<revision>
<version>0.2.2</version>
<date>2011-04-26</date>
<initials>vs</initials>
<remark><p>Added commenting feature on attachements.</p></remark>
</revision>
<revision>
<version>0.2.1</version>
<date>2011-04-24</date>
<initials>vs</initials>
@ -207,7 +213,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
</section2>
<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 two specific &lt;author /&gt; child nodes, &lt;name /&gt; and &lt;uri /&gt;, containing, respectively, the name of the original post author, and his XMPP URI (JID).</p>
<p>If a comments link is present (see the <link url='#comments_node'>Comments node</link> section of this document), the client SHOULD repeat it to keep the same discussion about the post.</p>
<p>If a comments link is present (see the <link url='#post_comments'>Post Comments</link> section of this document), the client SHOULD repeat it to keep the same discussion about the post.</p>
<example caption="Repeating a Post"><![CDATA[
<iq from='benvolio@montague.lit/mobile'
id='pub2'
@ -276,12 +282,12 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
type='image/jpeg'
length='156732'
href='http://montague.lit/romeo/files/uei8327hdz12.jpg'>
<link xmlns='urn:xmpp:microblog:0'
rel='self'
title='thumb'
type='image/jpeg'
length='31723'
href='http://montague.lit/romeo/files/uei8327hdz12_thumb.jpg'/>
<link xmlns='urn:xmpp:microblog:0'
rel='self'
title='thumb'
type='image/jpeg'
length='31723'
href='http://montague.lit/romeo/files/uei8327hdz12_thumb.jpg'/>
</link>
<link rel='enclosure'
title='Trip report'
@ -303,7 +309,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<section1 topic='Comments' anchor='comments'>
<p>Juliet and Benvolio may want to discuss about latest Romeo's post. Romeo's client MIGHT add a <link /> element to the PubSub item. The element MUST have "rel", "title" and "href" attributes, where "rel" MUST have the "replies" value; "title" MUST have the "comments" value; "href" MUST be an XMPP URI (see &rfc5122; and &rfc3986;).</p>
<section2 topic='Comments node' anchor='comments_node'>
<section2 topic='Post Comments' anchor='post_comments'>
<p>We assume Romeo's client first created a comments node (named "urn:xmpp:microblog:0:comments:hash", where "hash" is a client-side generated random hash), with defaults "pubsub#access_model" and "pubsub#publish_model" privacy settings (see &xep0060; for node creation and configuration).</p>
<example caption="Adding a comments link to a Post"><![CDATA[
<iq from='romeo@montague.lit/pda'
@ -340,6 +346,54 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
</item>
</publish>
</pubsub>
</iq>
]]></example>
</section2>
<section2 topic='Attachement Comments' anchor='attachement_comments'>
<p>As we do for <link url='#post_comments'>Post Comments</link>, Romeo's client MAY create one comments PubSub node for each attachement of a post (see section of <link url='#attach'>Attaching files to a Post</link> of this document).</p>
<p>The element to create MUST be children of the parent "link" element of the attachement. Some attributes differ from the original commenting specification: "xmlns" attribute MUST be set to value "urn:xmpp:microblog:0"; "title" attribute MUST be set to value "comments_file".</p>
<example caption="Adding a comments link to an Attachement"><![CDATA[
<iq from='romeo@montague.lit/pda'
id='pub5'
to='romeo@montague.lit'
type='set'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='urn:xmpp:microblog:0'>
<item id='1af87d4i-3f09-41gt-871e-098182g4b2az'>
<entry xmlns='http://www.w3.org/2005/Atom'>
<source>
<title>Romeo&amp;apos;s Microblog</title>
<link href='http://montague.lit/romeo'/>
<id>tag:montague.lit,2008:home</id>
<updated>2008-05-08T18:54:02Z</updated>
<author>
<name>Romeo Montague</name>
<uri>xmpp:romeo@montague.lit</uri>
</author>
</source>
<content type='text'>I love cranberries!</content>
<link rel='alternate'
type='text/html'
href='http://montague.lit/romeo/posts/1af87d4i-3f09-41gt-871e-098182g4b2az'/>
<link rel='alternate'
href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0;item=1af87d4i-3f09-41gt-871e-098182g4b2az'/>
<link rel='enclosure'
title='Delicious'
type='image/jpeg'
length='91741'
href='http://montague.lit/romeo/files/efoq9172kwq.jpg'>
<link xmlns='urn:xmpp:microblog:0'
rel='replies'
title='comments_file'
href='xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0%3Acomments%3Aa9fe0b44ea62c6be71fac8471696fece'/>
</link>
<id>tag:montague.lit,2008-05-08T18:54:02Z:posts-1af87d4i-3f09-41gt-871e-098182g4b2az</id>
<published>2008-05-08T18:54:02Z</published>
<updated>2008-05-08T18:54:02Z</updated>
</entry>
</item>
</publish>
</pubsub>
</iq>
]]></example>
</section2>
@ -377,7 +431,7 @@ xmpp:romeo@montague.lit?;node=urn%3Axmpp%3Amicroblog%3A0
<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"><![CDATA[
<iq from='romeo@montague.lit/mobile'
id='pub5'
id='pub7'
to='romeo@montague.lit'
type='set'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>