<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Bookmark last known name</title>
  <abstract>This document defines an XMPP protocol extension to allow users to pin PEP Native Bookmarks.</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>xxxx</number>
  <status>ProtoXEP</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>XMPP IM</spec>
    <spec>XEP-0402</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>NOT_YET_ASSIGNED</shortname>
  <tags><tag>muc</tag></tags>
  <author>
    <firstname>Nicolas</firstname>
    <surname>Cedilnik</surname>
    <email>nicoco@nicoco.fr</email>
    <jid>nicoco@nicoco.fr</jid>
  </author>
  <revision>
    <version>0.0.1</version>
    <date>2026-09-29</date>
    <initials>nc</initials>
    <remark><p>First draft.</p></remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p>For a client, knowing the human-readable name of a <span class="ref"><link url="https://xmpp.org/extensions/xep-0045.html">Multi-User Chat (XEP-0045)</link></span> <note>XEP-0045: Multi-User Chat &lt;<link url="https://xmpp.org/extensions/xep-0045.html">https://xmpp.org/extensions/xep-0045.html</link>&gt;.</note> room requires querying its <tt>disco#info</tt>.
While this is fine for user dialogs about joining a single room, it requires a lot of round-trips in case a client wants to list all <span class="ref"><link url="https://xmpp.org/extensions/xep-0402.html">PEP Native Bookmarks (XEP-0402)</link></span> <note>XEP-0402: PEP Native Bookmarks &lt;<link url="https://xmpp.org/extensions/xep-0402.html">https://xmpp.org/extensions/xep-0402.html</link>&gt;.</note> items, in a "open room" dialog, when it does not have any cached info about the rooms.</p>
  <p>This specification proposes a bookmark extension that avoid such round trips. It is written by entities that know the human-readable name of a room, and is meant to be used by clients that have not yet <tt>disco#info</tt>-queried that room</p>
</section1>
<section1 topic="Requirements" anchor="requirements">
  <p>This specification intentionally does not use the <span class="ref"><link url="https://xmpp.org/extensions/xep-0402.html">PEP Native Bookmarks (XEP-0402)</link></span> <note>XEP-0402: PEP Native Bookmarks &lt;<link url="https://xmpp.org/extensions/xep-0402.html">https://xmpp.org/extensions/xep-0402.html</link>&gt;.</note> <tt>name</tt> attribute.
This attribute is meant for a user-specified custom name for a given room, and does not serve the same purpose.
Setting this attibute to the <tt>disco#info</tt> name of a room is not a viable solution, as this means entities setting it are expected to update it when the room configuration changes.
  </p>
</section1>
<section1 topic="Use Cases" anchor="usecases">
  <ul>
    <li>A user join a room from their desktop client which is configured to not set the autojoin flag to true on bookmarks. Then they want to join from their mobile client too, searching for the room in their bookmarks, via their friendly name.</li>
    <li>A gateway writes bookmark items via <span class="ref"><link url="https://xmpp.org/extensions/xep-0356.html">Privileged Entity (XEP-0356)</link></span> <note>XEP-0356: Privileged Entity &lt;<link url="https://xmpp.org/extensions/xep-0356.html">https://xmpp.org/extensions/xep-0356.html</link>&gt;.</note> and wants to communicate their human-readable name to clients without them needing to query the <tt>disco#info</tt> of the rooms.</li>
  </ul>
</section1>
<section1 topic="Protocol" anchor="protocol">
  <p>The protocol is a simple <tt>last-known-name</tt> element defined as a bookmark extension.</p>
  <example caption="The 'last-known-name' bookmark extension"><![CDATA[
<item id='1894180981465406846@cool-gateway.example.com'>
  <conference xmlns='urn:xmpp:bookmarks:1'
              autojoin='false'>
    ...
    <extensions>
      <last-known-name xmlns='urn:xmpp:muc:last-known-name:0'>
        A human-readable name
      </last-known-name>
      ...
    </extensions>
  </conference>
</item>
]]></example>
</section1>
<section1 topic="Accessibility Considerations" anchor="access">
  <p>None.</p>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>None.</p>
</section1>
<section1 topic="Privacy Considerations" anchor="privacy">
  <p>None.</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>None.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <p>This specification defines a new namespace: 'urn:xmpp:last-known-name'</p>
</section1>
<section1 topic="XML Schema" anchor="schema">
  <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:xmpp:last-known-name:0'
    xmlns='urn:xmpp:last-known-name:0'
    elementFormDefault='qualified'>
  <xs:annotation>
    <xs:documentation>
      This schema defines the 'last-known-name' bookmark extension element
    </xs:documentation>
  </xs:annotation>
  <xs:element name='last-known-name' />
</xs:schema>]]>
</code>
</section1>
</xep>
