zorn-v/xmpp

How to get Archived Messages

CreativeWolf opened this issue · 5 comments

Heya,

@zorn-v Thanks for extending this repo!

While - getMessages() serves the purpose of getting Offline Messages - #1

How does one get messages from the archives?

Appreciate pointers on this.

Thanks!

What do you mean by "archive" ? Any specification link or maybe example ?

which by the way, goes in an endless loop while retrieving when I tried the while loop method you had mentioned.

My assumption is that client must inform server that it received those messages, but maybe it just a bug.

Need a time to test and debug offline messages then.

Please let me know how I can help contribute.

You can play around here. When message stanza received it in $msgNode which type is http://php.net/domnode

$msgNode = $event->getParameter(0);

Here is attach event on incoming message

$inputEventManager->attach('{jabber:client}message', [$this, 'processMessage']);

Here you can investigate type of event to attach ({jabber:client}message in case of incoming <message> for example)

list($event, $startTag, $param) = $event;