Skip to content

Allow to receive IQ messages other than for the configuration

Created by: kollix

To fix issue #96 this small change shall be included, please. To know the QXmppIq.id() for the result message, I create my own QXmppMucOwnerIq instead of using room->setConfiguration(form), e.g.:

QXmppMucOwnerIq iqPacket; iqPacket.setType(QXmppIq::Set); iqPacket.setTo(room->jid()); iqPacket.setForm(form); resultId = iqPacket.id();

then I wait for the IQ message:

connect(client, SIGNAL(iqReceived(const QXmppIq &)),
        this, SLOT(iqReceived(const QXmppIq &)));

and in the slot:

void XmppWaitMucRoom::iqReceived(const QXmppIq &iq) { if ( (iq.from() != room->jid()) || (iq.id() != resultId) ) return;

if ( iq.type() == QXmppIq::Error ) error(iq.error());

done = true; }

Merge request reports

Loading