Retrieval of recent events

It is now possible to retrieve list of last logged events (chat, calls, groupchats) for every bare jid with which archive owner communicated with. As this collection may be rather big, we added support for XEP-0059: Result Set Management to make it possible to request part of a list (ie. first 100 entries). For now it is only possible to request next entries of a list by providing offset/index at which next result should start at.

Warning

There is no support for RSM pagination done using <before/> and <after/>.

Retrieval of list of all recent events

In this example we will request and receive recent events of any type or condition from whole time for which we have entries in an archive.

Example request to retrieve full list of all recent events. 

<iq type="get" id="query1">
    <query xmlns="urn:xmpp:tigase:recent"/>
</iq>

Example response to retrieval of all recent events. 

<iq id="1" xmlns="jabber:client" type="result">
    <events xmlns="urn:xmpp:tigase:recent">
        <event
               with="buddy-2@example.com"
               type="call"
               direction="from"
               condition="success"
               time="2017-01-21T10:06:10Z" />
        <event
               with="some-room@muc.example.com"
               type="groupchat"
               direction="from"
               body="Welcome to our groupchat"
               time="2017-01-20T10:08:12Z"/>
        <event
               with="buddy-1@example.com"
               type="chat"
               direction="to"
               body="Hello world"
               time="2017-01-19T17:20:51Z" />
    </events>
</iq>

Retrieval of list of all recent events in specified time period

In this example we will request and receive recent events of any type or condition which occurred within specified time frame.

Example request to retrieve full list of all recent events. 

<iq type="get" id="query1">
    <query xmlns="urn:xmpp:tigase:recent" start="2017-01-20T00:00:00Z" end="2017-01-31T00:00:00Z"/>
</iq>

Example response to retrieval of all recent events. 

<iq id="1" xmlns="jabber:client" type="result">
    <events xmlns="urn:xmpp:tigase:recent">
        <event
               with="buddy-2@example.com"
               type="call"
               direction="from"
               condition="success"
               time="2017-01-21T10:06:10Z" />
        <event
               with="some-room@muc.example.com"
               type="groupchat"
               direction="from"
               body="Welcome to our groupchat"
               time="2017-01-20T10:08:12Z"/>
    </events>
</iq>

Requesting filtered list of recent events

It is also possible to filter list of recent events by event type

  • chat
  • groupchat
  • call (and call status)

    • success (successful call)
    • missed (missed call)
    • canceled (canceled call)

Requesting only recent chat events

Example request to retrieve full list of all recent chat events. 

<iq type="get" id="query1">
    <query xmlns="urn:xmpp:tigase:recent">
        <event-types>
            <chat/>
        </event-types>
    </query>
</iq>

Example response to retrieval of recent chat events. 

<iq id="1" xmlns="jabber:client" type="result">
    <events xmlns="urn:xmpp:tigase:recent">
        <event
               with="buddy-2@example.com"
               type="chat"
               direction="from"
               condition="success"
               time="2017-01-21T09:06:10Z" />
        <event
               with="buddy-1@example.com"
               type="chat"
               direction="to"
               body="Hello world"
               time="2017-01-19T17:20:51Z" />
    </events>
</iq>

Requesting only recent missed or canceled call events

Example request to retrieve list fo recent missed or canceled call events. 

<iq type="get" id="query1">
    <query xmlns="urn:xmpp:tigase:recent">
        <event-types>
            <call>
                <missed/>
                <canceled/>
            </call>
        </event-types>
    </query>
</iq>

Example response to retrieval of recent missed or canceled call events. 

<iq id="1" xmlns="jabber:client" type="result">
    <events xmlns="urn:xmpp:tigase:recent">
        <event
               with="buddy-2@example.com"
               type="call"
               direction="from"
               condition="missed"
               time="2017-01-20T10:06:10Z" />
        <event
               with="buddy-1@example.com"
               type="call"
               direction="to"
               condition="canceled"
               time="2017-01-18T17:20:51Z" />
    </events>
</iq>