-
Notifications
You must be signed in to change notification settings - Fork 196
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
Implement XEP-0369/XEP-0405 (MIX): IQ queries #174
Conversation
Do you have any idea why some of the travis builds fail (I'm not having that error locally with gcc 8.2)? Didn't I do exactly the same as in the other tests? edit: |
Codecov Report
@@ Coverage Diff @@
## master #174 +/- ##
==========================================
+ Coverage 65.27% 65.87% +0.59%
==========================================
Files 146 149 +3
Lines 14591 14846 +255
==========================================
+ Hits 9525 9780 +255
Misses 5066 5066
Continue to review full report at Codecov.
|
... now it's really fixed (there was a |
50f6861
to
90b071a
Compare
Now also added a test for |
ping! :) |
src/base/QXmppMixIq.cpp
Outdated
child = child.firstChildElement(); | ||
} | ||
|
||
if (child.isNull() || child.namespaceURI() != ns_mix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm finding this condition a bit confusing, maybe turn it into a "positive" condition?
if (!child.isNull() && child.namespaceURI() == ns_mix) {
// do something with the child
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
{ | ||
QDomElement child = element.firstChildElement(); | ||
// determine action type | ||
m_actionType = (QXmppMixIq::Type) MIX_ACTION_TYPES.indexOf(child.tagName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this blow up if child is null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it won't. I also added a test for the empty case.
This implements all used IQ queries of XEP-0369: Mediated Information eXchange (MIX) (v0.14.1) and XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements (v0.3.1), including unit tests.
This implements all used IQ queries of XEP-0369: Mediated Information
eXchange (MIX) (v0.14.0) and XEP-0405: Mediated Information eXchange (MIX):
Participant Server Requirements (v0.3.0), including unit tests.
Happy reviewing! :D