Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to receive IQ messages other than for the configuration #102

Closed
wants to merge 2 commits into from

Conversation

kollix
Copy link
Contributor

@kollix kollix commented Aug 14, 2016

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;
}

@lnjX
Copy link
Member

lnjX commented Oct 26, 2019

Replaced by #226.

@lnjX lnjX closed this Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants