<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.19 (Ruby 3.3.4) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-mahy-vcon-mimi-messages-00" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.23.2 -->
  <front>
    <title abbrev="VCON for MIMI">VCON for MIMI Messages</title>
    <seriesInfo name="Internet-Draft" value="draft-mahy-vcon-mimi-messages-00"/>
    <author fullname="Rohan Mahy">
      <organization>Rohan Mahy Consulting Services</organization>
      <address>
        <email>rohan.ietf@gmail.com</email>
      </address>
    </author>
    <date year="2024" month="October" day="21"/>
    <area>Applications and Real-Time</area>
    <workgroup>Virtualized Conversations</workgroup>
    <keyword>instant messaging</keyword>
    <keyword>message history</keyword>
    <abstract>
      <?line 36?>

<t>This document describes extensions to the Virtualized Conversation (VCON)
syntax for instant messaging systems using the More Instant Messaging
Interoperability (MIMI) content format.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://rohanmahy.github.io/vcon-mimi-messages/draft-mahy-vcon-mimi-messages.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-mahy-vcon-mimi-messages/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Virtualized Conversations Working Group mailing list (<eref target="mailto:vcon@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/vcon/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/vcon/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/rohanmahy/vcon-mimi-messages"/>.</t>
    </note>
  </front>
  <middle>
    <?line 43?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>VCON <xref target="I-D.ietf-vcon-vcon-container"/> is a format for recording and
transmitting conversations. MIMI content <xref target="I-D.ietf-mimi-content"/>
is a format for conveying Instant Messages in an interoperable way
when end-to-end encrypted. This document describes a way to translate
a set of MIMI messages in a conversation or part of a conversation into
a VCON.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

</section>
    <section anchor="syntax">
      <name>Syntax</name>
      <t>A MIMI conversation (or portion thereof) is represented in VCON with
a mandatory list of parties and dialogs, a new top-level room object.</t>
      <section anchor="room-information">
        <name>Room information</name>
        <t>This document adds a top-level <tt>room</tt> object. It contains metadata
known about the room at the start of the VCON period.</t>
        <ul spacing="normal">
          <li>
            <t><tt>id</tt> is the MIMI room ID URL. It is mandatory.</t>
          </li>
          <li>
            <t><tt>name</tt> is the textual name of the room. It is optional.</t>
          </li>
        </ul>
      </section>
      <section anchor="parties">
        <name>Parties</name>
        <t>The <tt>parties</tt> array <bcp14>MUST</bcp14> contain all the
participants who were in the conversation at any point in time during the
period represented by the VCON.</t>
        <t>This document adds a new party_object_type: <tt>imUri</tt>. It is mandatory.
The <tt>name</tt> field is optional. The <tt>role</tt> indicates the MIMI role and is
optional.</t>
      </section>
      <section anchor="extensions-to-the-dialog-object">
        <name>Extensions to the dialog object</name>
        <t>The dialog object consists of an array of instant messages of type "text".
The start time is set to the hub received timestamp when available.
The duration is zero. The parties array consist of the party indexes of those who were active participants when the message was sent.
The originator is set to the parties index of the sender of the message.</t>
        <ul spacing="normal">
          <li>
            <t><tt>messageId</tt> is the base64url encoding of the MIMI content messageId. It is mandatory.</t>
          </li>
          <li>
            <t><tt>replaces</tt> is the base64url encoding of the MIMI content messageId of the message this message replaces. It is optional if empty.</t>
          </li>
          <li>
            <t><tt>expires</tt> is the expiration date/time of the message expressed as a VCON
(text) date_type. It is optional if empty.</t>
          </li>
          <li>
            <t><tt>inReplyTo</tt> is the base64url encoding of the MIMI content messageId of the message to which this message is replying (or reacting). It is optional if empty.</t>
          </li>
          <li>
            <t><tt>lastSeen</tt> is an array of base64url-encoded message ids. It is mandatory.</t>
          </li>
          <li>
            <t><tt>mimiExtensions</tt> is a object (map) containing MIMI extensions. It is optional.</t>
          </li>
        </ul>
        <t>VCON typically expresses content using the body, encoding, and mimetype
fields. In order to preserve this convention we use these fields directly for a MIMI SinglePart structure, but use new MultiPart and ExternalPart
structure for those MIMI structures.</t>
        <t>ExternalPart has several fields for the decryption and integrity of the referenced content. These can be omitted once the content has been downloaded, decrypted, verified, and included in the VCON attachments array.</t>
        <ul spacing="normal">
          <li>
            <t><tt>disposition</tt> - optional if set to the default value ("render")</t>
          </li>
          <li>
            <t><tt>language</tt> - optional if absent</t>
          </li>
          <li>
            <t><tt>partIndex</tt> is an integer. It is mandatory</t>
          </li>
        </ul>
      </section>
      <section anchor="multipart">
        <name>MultiPart</name>
        <ul spacing="normal">
          <li>
            <t><tt>partSemantics</tt> is one of "chooseOne", "singleUnit", or "processAll". It is mandatory.</t>
          </li>
          <li>
            <t><tt>parts</tt> is an array of <tt>Part</tt>s. It is mandatory.</t>
          </li>
        </ul>
      </section>
      <section anchor="externalpart">
        <name>ExternalPart</name>
        <ul spacing="normal">
          <li>
            <t>mimetype (contentType in MIMI). optional but recommended.</t>
          </li>
          <li>
            <t>url is the URL of the content as a text string. mandatory</t>
          </li>
          <li>
            <t>expires is a date_type (text) date. optional.</t>
          </li>
          <li>
            <t>size is an integer number of octets. optional.</t>
          </li>
          <li>
            <t>description is a text string. optional.</t>
          </li>
          <li>
            <t>filename is a text string. optional.</t>
          </li>
        </ul>
        <t>These encryption/validation related fields can be omitted once the content is available locally as an attachment. All of them are base64url encoded strings. Otherwise they are mandatory if present in the MIMI content.</t>
        <ul spacing="normal">
          <li>
            <t>encAlg</t>
          </li>
          <li>
            <t>key</t>
          </li>
          <li>
            <t>nonce</t>
          </li>
          <li>
            <t>aad</t>
          </li>
          <li>
            <t>hashAlg</t>
          </li>
          <li>
            <t>contentHash</t>
          </li>
        </ul>
        <t><strong>TODO</strong>: how to represent a downloaded and decrypted object in attachments?</t>
      </section>
      <section anchor="part">
        <name>Part</name>
        <ul spacing="normal">
          <li>
            <t><tt>disposition</tt> - optional if set to the default value ("render")</t>
          </li>
          <li>
            <t><tt>language</tt> - optional if absent</t>
          </li>
          <li>
            <t><tt>partIndex</tt> is an integer. It is mandatory</t>
          </li>
          <li>
            <t><tt>cardinality</tt> is one of "nullpart", "single", "external", or "multi". mandatory.</t>
          </li>
        </ul>
        <t>if cardinality is "single", then body, encoding, and mimetype
fields are included directly in the Part object.</t>
      </section>
      <section anchor="changes-to-the-room">
        <name>Changes to the room</name>
        <t>Changes to the room metadata or participation should be accompanied by
a new dialog type:</t>
        <ul spacing="normal">
          <li>
            <t>room metadata changes</t>
          </li>
          <li>
            <t>participants joining and leaving</t>
          </li>
          <li>
            <t>participants adding new clients</t>
          </li>
          <li>
            <t>moderation events?</t>
          </li>
        </ul>
        <t><strong>TODO</strong></t>
      </section>
      <section anchor="partyeventtype-events">
        <name>party_event_type events</name>
        <artwork><![CDATA[
party_event_type.event /= "add" / "welcome" / "leave" / "remove" / "ban"
]]></artwork>
        <ul spacing="normal">
          <li>
            <t>add: user added herself directly</t>
          </li>
          <li>
            <t>welcome: user added by someone else</t>
          </li>
          <li>
            <t>leave: user leaves of their own accord</t>
          </li>
          <li>
            <t>remove: user is removed by another user</t>
          </li>
          <li>
            <t>ban: user is banned from the group</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="examples">
      <name>Examples</name>
      <t>Will fill in after the draft deadline.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>TODO Security</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="I-D.ietf-vcon-vcon-container">
        <front>
          <title>The JSON format for vCon - Conversation Data Container</title>
          <author fullname="Daniel Petrie" initials="D." surname="Petrie">
            <organization>SIPez LLC</organization>
          </author>
          <author fullname="Thomas McCarthy-Howe" initials="T." surname="McCarthy-Howe">
            <organization>Strolid</organization>
          </author>
          <date day="20" month="October" year="2024"/>
          <abstract>
            <t>   A vCon is the container for data and information relating to a real-
   time, human conversation.  It is analogous to a [vCard] which enables
   the definition, interchange and storage of an individual's various
   points of contact.  The data contained in a vCon may be derived from
   any multimedia session, traditional phone call, video conference, SMS
   or MMS message exchange, webchat or email thread.  The data in the
   container relating to the conversation may include Call Detail
   Records (CDR), call meta data, participant identity information (e.g.
   STIR PASSporT), the actual conversational data exchanged (e.g. audio,
   video, text), realtime or post conversational analysis and
   attachments of files exchanged during the conversation.  A
   standardized conversation container enables many applications,
   establishes a common method of storage and interchange, and supports
   identity, privacy and security efforts (see [vCon-white-paper])

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-vcon-vcon-container-01"/>
      </reference>
      <reference anchor="I-D.ietf-mimi-content">
        <front>
          <title>More Instant Messaging Interoperability (MIMI) message content</title>
          <author fullname="Rohan Mahy" initials="R." surname="Mahy">
            <organization>Rohan Mahy Consulting Services</organization>
          </author>
          <date day="10" month="June" year="2024"/>
          <abstract>
            <t>   This document describes content semantics common in Instant Messaging
   (IM) systems and describes a profile suitable for instant messaging
   interoperability of messages end-to-end encrypted inside the MLS
   (Message Layer Security) Protocol.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-mimi-content-04"/>
      </reference>
      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <?line 200?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>TODO acknowledge.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA81Y23IbuRF9x1cg4xfJZVKrxJVsVHvTSnLMKstydMnWViq1
AmdAEmvMgAVgSNMu+1vyLfmynG5ghhxKdrZSecgLOYNLX053HzRmNBqJaKLV
J7L429nVazlzXl5OLifyUoeg5joUQk2nXq/2FxSiVFHPnd+cSNPMnBCVKxtV
Q1Ll1SyOarXYjFala0a1qc2ozvJGX30lQjutTQjGNXGzxIbJxe0LKZ9IZYOD
HtNUeqnx08TimSx0Za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