XMPP query archive by latest messages

后端 未结 3 659
醉酒成梦
醉酒成梦 2021-01-13 01:13

I\'m reading http://xmpp.org/extensions/xep-0313.html to query Ejabberd for messages archived with a certain user.

This is the xml that I\'m sending:



        
3条回答
  •  礼貌的吻别
    2021-01-13 01:21

    XEP-0313 Message Archive Management rely on XEP-0059 Result Set Management for pagination.

    RSM specification explains how to get the last page in a Result Set:

    The requesting entity MAY ask for the last page in a result set by including in its request an empty element, and the maximum number of items to return.

    It means you need to add an empty element in your result set query.

    Here is an example based on XEP-0313 version 0.4 on how to get the last 20 messages in a conversation with a given user. The query limit is defined by the parameter max (it defined the size of the pages).

    
      
        
          
            urn:xmpp:mam:0
          
          
            juliet@capulet.lit
          
        
        
         20
         
        
      
    
    

提交回复
热议问题