node.js - How to fetch archive messages from an external component -


i'm using node-xmpp-component build external-xmpp-component, , need pull archived messages given jid.

i'm able connect , send messages, can't figure how build sanza requesting archived messages.

note: question not how archived messages,it how them external xmpp component.

to message archive, need query user account requesting archive. see in xep example (querying archive), there no place define user acting as. supposed user sending xmpp packet:

<iq type='set' id='juliet1'>   <query xmlns='urn:xmpp:mam:0' queryid='f27' /> </iq> 

however, node-xmpp-component implements xep-0114: jabber component protocol. component protocol says basically, can act component or usernames component domain:

once authenticated, component can send stanzas through server , receive stanzas server. stanzas sent server must possess 'from' attribute , 'to' attribute, in 'jabber:server' namespace. domain identifier portion of jid contained in 'from' attribute must match hostname of component. however, restriction on 'from' addresses, , component may send stanzas user @ hostname.

it means privacy / security reasons, "jabber component" cannot send packet on behalf of main server user.

so, cannot forge iq packet needed query mam archive user component, reason being privacy.

you need find design feature want implement.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -