Stream Feature: Message Archive Management #32

Open
opened 2024-12-26 23:14:42 +00:00 by Ivan-lis · 0 comments
Member

XEP

https://xmpp.org/extensions/xep-0313.html

Example for client request:

C: <iq to="archive.example.com" type="set" id="query1">
  <query xmlns="urn:xmpp:mam:2">
    <x xmlns="jabber:x:data" type="submit">
      <field var="FORM_TYPE" type="hidden">
        <value>urn:xmpp:mam:2</value>
      </field>
      <field var="thread">
        <value>2c5419d3-39c1-4c03-ae2e-fca5c5f2b865</value>
      </field>
    </x>
  </query>
</iq>

Example server responce:

<iq type="result" id="query1">
  <query xmlns="urn:xmpp:mam:2">
    <result id="1">
      <forwarded xmlns="urn:xmpp:forward:0">
        <message from="user1@example.com" to="user2@example.com">
          <thread>2c5419d3-39c1-4c03-ae2e-fca5c5f2b865</thread>
          <body>Message 1 in the thread.</body>
        </message>
      </forwarded>
    </result>
    <result id="2">
      <forwarded xmlns="urn:xmpp:forward:0">
        <message from="user2@example.com" to="user1@example.com">
          <thread>2c5419d3-39c1-4c03-ae2e-fca5c5f2b865</thread>
          <body>Message 2 in the thread.</body>
        </message>
      </forwarded>
    </result>
  </query>
</iq>

NOTE: server must support XEP-0313 (Message Archive Management) and XEP-0359 (Unique and Stable Stanza IDs) for accurate retrieval.

XEP https://xmpp.org/extensions/xep-0313.html Example for client request: ```xml C: <iq to="archive.example.com" type="set" id="query1"> <query xmlns="urn:xmpp:mam:2"> <x xmlns="jabber:x:data" type="submit"> <field var="FORM_TYPE" type="hidden"> <value>urn:xmpp:mam:2</value> </field> <field var="thread"> <value>2c5419d3-39c1-4c03-ae2e-fca5c5f2b865</value> </field> </x> </query> </iq> ``` Example server responce: ```xml <iq type="result" id="query1"> <query xmlns="urn:xmpp:mam:2"> <result id="1"> <forwarded xmlns="urn:xmpp:forward:0"> <message from="user1@example.com" to="user2@example.com"> <thread>2c5419d3-39c1-4c03-ae2e-fca5c5f2b865</thread> <body>Message 1 in the thread.</body> </message> </forwarded> </result> <result id="2"> <forwarded xmlns="urn:xmpp:forward:0"> <message from="user2@example.com" to="user1@example.com"> <thread>2c5419d3-39c1-4c03-ae2e-fca5c5f2b865</thread> <body>Message 2 in the thread.</body> </message> </forwarded> </result> </query> </iq> ``` NOTE: server must support XEP-0313 (Message Archive Management) and XEP-0359 (Unique and Stable Stanza IDs) for accurate retrieval.
Ivan-lis added this to the Main project 2024-12-26 23:14:42 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Larra/larra#32
No description provided.