xmppjs / xmpp.js

XMPP for JavaScript
ISC License
2.18k stars 372 forks source link

iqCaller not sending full record #877

Closed akramkhan1102 closed 3 years ago

akramkhan1102 commented 3 years ago

I am trying to get the full chat record with the help of iq but i am getting some of records not for every user. Please check the below code this.xmppClient.iqCaller.set( xml('query', 'urn:xmpp:mam:2'), );

Also i have updated it accordig to xmpp 0313 xml but not recieved full data

sonnyp commented 3 years ago

It's probably paginating

See https://xmpp.org/extensions/xep-0313.html#query-paging

If you need help with XMPP please go to https://xmpp.org/community/

akramkhan1102 commented 3 years ago

I Ned help from your end @sonnyp because stanza sending me error when i am passing the xml in iqCaller

sonnyp commented 3 years ago

Please share logs with https://github.com/xmppjs/xmpp.js/tree/master/packages/debug#debug

akramkhan1102 commented 3 years ago

@sonnyp I am using "@xmpp/debug": "^0.11.0" and implemented in my react native app as described but not getting the result as expected But i have the iq request code which i implemented, please check below iq request

this.xmppClient.iqCaller.request(
                    xml("iq", { to:"Akram_khan@example.com", type: "set", xmlns:"jabber:client" },
                        xml('query', 'urn:xmpp:mam:2',
                            xml("x", {ype:"submit", xmlns:"jabber:x:data"},
                                xml("field", {type:"hidden",  var:"FORM_TYPE"},
                                    xml("value", "urn:xmpp:mam:2")
                                ),
                                xml("field", {var:"with"},
                                xml("value", "Akramkhan1102@example.com")
                            )
                            )
                        ),
                    )

                );
       and after using this i am getting the error from stanza `The action is not allowed`
sonnyp commented 3 years ago

Please share the logs coming from https://github.com/xmppjs/xmpp.js/tree/master/packages/debug#debug if you want help.