xmppjs / xmpp.js

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

Issue while Implementing MUC logics #830

Closed axcl closed 4 years ago

axcl commented 4 years ago

Hey Guys,

Thanks for this amazing library. Actually i am facing ussing while implementing logics for MUC search, join etc. Code: let _self = this; let message = xml( "iq", { xmlns: "jabber:client", type: "get", from: _self.address, id: 'get-room-info-0', to: 'conference.domain.com' }, xml('query', 'http://jabber.org/protocol/disco#items') ); let chatRoom = await this.xmppClient.iqCaller.get(message); console.log('Chat Rooms', chatRoom);

Output XML: `<iq type="get" from="test1user@domain.com/App59962" id="get-room-info-0'" to="conference.domain.com">

`

Response: [Unhandled promise rejection: StanzaError: service-unavailable - No module is handling this query]

When i tried sending same xml from XMPP client gajim it worked and return disco items result.

Kindly help me out.

axcl commented 4 years ago

solved. Actually I have to use this.xmppClient.iqCaller.request instead of this.xmppClient.iqCaller.get

sonnyp commented 4 years ago

@axcl if you want to use get then remove the iq parent see https://github.com/xmppjs/xmpp.js/tree/master/packages/iq#get