0

I'm using "GroupChat" using Openfire,XMPP,iOS.

I want to fetch the history after defined time, so I google about it and i find to use "Since" for it.

  NSXMLElement *history = [NSXMLElement elementWithName:@"history"];
    [history addAttributeWithName:@"since" stringValue:@"2016-07-04T09:06:38.588Z"];

    [xmppRoom joinRoomUsingNickname:self.xmppStream.myJID.user
                            history:history
                           password:nil];

but it fetch all record from table, i want only record after defined time. I also use an open fire time stamp, but it hasn't worked.

How do i fetch history with time ?

Kabali
  • 129
  • 1
  • 13

1 Answers1

0

[XMPP Extension- 0045]: http://xmpp.org/extensions/xep-0045.html

7.2.15 Managing Discussion History

    from='hag66@shakespeare.lit/pda'
    id='n13mt3l'
    to='coven@chat.shakespeare.lit/thirdwitch'>
  <x xmlns='http://jabber.org/protocol/muc'>
    <history since='2015-01-01T00:00:00Z'/>
  </x>
</presence>

Also check room defaults such as the number of messages you can fetch or your server is capable of.