<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
  <header>
    <title>Pubsub Stories</title>
    <abstract>This specification defines a way of publishing Stories over XMPP.</abstract>
    
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
    <number>0501</number>
    <status>Experimental</status>
    <type>Standards Track</type>
    <sig>Standards</sig>
    <approver>Council</approver>
    <dependencies>
      <spec>XMPP Core</spec>
      <spec>XMPP IM</spec>
      <spec>XEP-0060</spec>
      <spec>XEP-0163</spec>
      <spec>XEP-0472</spec>
      <spec>RFC 4287</spec>
    </dependencies>
    <supersedes/>
    <supersededby/>
    <shortname>ps</shortname>
    
  <author>
    <firstname>Timothée</firstname>
    <surname>Jaussoin</surname>
    <email>edhelas@movim.eu</email>
    <jid>edhelas@movim.eu</jid>
    <uri>https://edhelas.movim.eu</uri>
  </author>

    <revision>
      <version>0.2.0</version>
      <date>2024-12-20</date>
      <initials>tj</initials>
      <remark>
        <p>Add pubsub#item_expire in the node configuration</p>
      </remark>
    </revision>
    <revision>
      <version>0.1.0</version>
      <date>2024-12-19</date>
      <initials>XEP Editor: dg</initials>
      <remark>
        <p>Promoted to Experimental</p>
      </remark>
    </revision>
    <revision>
      <version>0.0.1</version>
      <date>2024-12-03</date>
      <initials>tj</initials>
      <remark>Initial version.</remark>
    </revision>
  </header>

    <section1 topic="Glossary" anchor="glossary">
    <dl>
      <di>
        <dt>Story</dt>
        <dd>An item stored in a Stories Pubsub node.</dd>
      </di>
    </dl>
  </section1>

  <section1 topic="Introduction" anchor="intro">
    <p>Introduced by Snapchat in 2012 Stories are a way for users to share content that can be viewed for a specific amount of time in chronological order.</p>

    <p><span class="ref"><link url="https://xmpp.org/extensions/xep-0472.html">PubSub Social Feed (XEP-0472)</link></span> <note>XEP-0472: PubSub Social Feed &lt;<link url="https://xmpp.org/extensions/xep-0472.html">https://xmpp.org/extensions/xep-0472.html</link>&gt;.</note> already defines a generic way of publishing social content on XMPP. This extension defines a way to publish Stories content on a user <span class="ref"><link url="https://xmpp.org/extensions/xep-0163.html">Personal Eventing Protocol (XEP-0163)</link></span> <note>XEP-0163: Personal Eventing Protocol &lt;<link url="https://xmpp.org/extensions/xep-0163.html">https://xmpp.org/extensions/xep-0163.html</link>&gt;.</note> node.</p>

    <p>This extension extends <span class="ref"><link url="https://xmpp.org/extensions/xep-0472.html">PubSub Social Feed (XEP-0472)</link></span> <note>XEP-0472: PubSub Social Feed &lt;<link url="https://xmpp.org/extensions/xep-0472.html">https://xmpp.org/extensions/xep-0472.html</link>&gt;.</note> by defining a new Profile (see <link url="https://xmpp.org/extensions/xep-0472.html#profiles">Profiles</link>) called Pubsub Stories.</p>
  </section1>

  <section1 topic="Discovery" anchor="discovery">
    <p>If an entity implements Pubsub Stories, it MUST specify the 'urn:xmpp:pubsub-social-feed:1' and 'urn:xmpp:pubsub-social-feed:stories:0' features in its service discovery information features as specified in <span class="ref"><link url="https://xmpp.org/extensions/xep-0030.html">Service Discovery (XEP-0030)</link></span> <note>XEP-0030: Service Discovery &lt;<link url="https://xmpp.org/extensions/xep-0030.html">https://xmpp.org/extensions/xep-0030.html</link>&gt;.</note> and the Entity Capabilities profile specified in <span class="ref"><link url="https://xmpp.org/extensions/xep-0115.html">Entity Capabilities (XEP-0115)</link></span> <note>XEP-0115: Entity Capabilities &lt;<link url="https://xmpp.org/extensions/xep-0115.html">https://xmpp.org/extensions/xep-0115.html</link>&gt;.</note>.</p>

    <p>If an entity wish to receive notifications from a contact when a Story is published it should also declares it in its service discovery followed by "+notify"</p>

    <example caption="The entity responds with Stories feature"><![CDATA[
  <iq type='result'
      id='disco1'
      from='juliet@capulet.lit/sabo239'
      to='romeo@montegue.lit/30d3d8'>
    <query xmlns='http://jabber.org/protocol/disco#info'>
      ...
      <feature var='urn:xmpp:pubsub-social-feed:1'/>
      <feature var='urn:xmpp:pubsub-social-feed:stories:0'/>
      <feature var='urn:xmpp:pubsub-social-feed:stories:0+notify'/>
      ...
    </query>
  </iq>
  ]]></example>
  </section1>

  <section1 topic="Protocol" anchor="protocol">
    <section2 topic="Pubsub Stories profile" anchor="profile_stories">
      <p>This profile is defined by the Pubsub type "urn:xmpp:pubsub-social-feed:stories:0" and is hosted on a "urn:xmpp:pubsub-social-feed:stories:0" <span class="ref"><link url="https://xmpp.org/extensions/xep-0163.html">Personal Eventing Protocol (XEP-0163)</link></span> <note>XEP-0163: Personal Eventing Protocol &lt;<link url="https://xmpp.org/extensions/xep-0163.html">https://xmpp.org/extensions/xep-0163.html</link>&gt;.</note> node.</p>

      <p>All the items published in a Pubsub Stories node MUST have only one attached media. This media MUST be of type "enclosure" as specified in <span class="ref"><link url="http://tools.ietf.org/html/rfc4287">RFC 4287</link></span> <note>RFC 4287: The Atom Syndication Format &lt;<link url="http://tools.ietf.org/html/rfc4287">http://tools.ietf.org/html/rfc4287</link>&gt;.</note>.</p>
      <example caption="An Atom attached picture"><![CDATA[
<link rel='enclosure' href='https://capulet.lit/upload/romeo-story.jpg' type='image/jpeg' title='Stories 03-02-1597'/>
]]></example>

      <section3 topic="Pubsub Node Configuration" anchor="profile_base_node_config">
        <p>Stories node MUST base their default configuration on the <link url="https://xmpp.org/extensions/xep-0472.html#profile_base">Base Profile</link> and:</p>
        <ol>
          <li>The "pubsub#type" MUST be set to "urn:xmpp:pubsub-social-feed:stories:0"</li>
          <li>The "pubsub#access_model" SHOULD be set to "presence".</li>
          <li>The "pubsub#item_expire" SHOULD be set, usually 24 hours (86400).</li>
        </ol>
      </section3>
    </section2>
  </section1>

  <section1 topic="Business Rules" anchor="bizrules">
    <p>If the "pubsub#item_expire" value is set subscribers clients MUST hide or destroy the received items once they expire.</p>
    <p>If the "pubsub#item_expire" value is not set publishers clients SHOULD retract the items after a specific amount of time, usually 24 hours. </p>
  </section1>

  <section1 topic="Security Considerations" anchor="security">
    <p>There are no security features or concerns related to this proposal.</p>
  </section1>

  <section1 topic="IANA Considerations" anchor="iana">
    <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
  </section1>

  <section1 topic="XMPP Registrar Considerations" anchor="registrar">
    <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> is requested to issue an initial namespace of "urn:xmpp:pubsub-social-feed:stories:0".</p>
  </section1>

  <section1 topic="XML Schema" anchor="schema">
    <p>
      This specification re-uses the schema for the Atom content format, i.e., the 'http://www.w3.org/2005/Atom' namespace (see
      <span class="ref"><link url="http://tools.ietf.org/html/rfc4287">RFC 4287</link></span> <note>RFC 4287: The Atom Syndication Format &lt;<link url="http://tools.ietf.org/html/rfc4287">http://tools.ietf.org/html/rfc4287</link>&gt;.</note>
      ).
    </p>
  </section1>

</xep>
