Skip to content

Commit

Permalink
Merge pull request robbiehanson#488 from jonstaff/master
Browse files Browse the repository at this point in the history
Updated XEP-0077 to no longer use childCount == 0 as validation
  • Loading branch information
ObjColumnist committed Jan 24, 2015
2 parents ec734d9 + 8a36dab commit 97aef5a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Extensions/XEP-0077/XMPPRegistration.m
Expand Up @@ -162,7 +162,7 @@ - (void)handlePasswordChangeQueryIQ:(XMPPIQ *)iq withInfo:(XMPPBasicTrackingInfo

NSString *type = [iq type];

if ([type isEqualToString:@"result"] && iq.childCount == 0) {
if ([type isEqualToString:@"result"]) {
[multicastDelegate passwordChangeSuccessful:self];
} else {
// this should be impossible to reach, but just for safety's sake...
Expand Down Expand Up @@ -203,7 +203,7 @@ - (void)handleRegistrationCancelQueryIQ:(XMPPIQ *)iq withInfo:(XMPPBasicTracking

NSString *type = [iq type];

if ([type isEqualToString:@"result"] && iq.childCount == 0) {
if ([type isEqualToString:@"result"]) {
[multicastDelegate cancelRegistrationSuccessful:self];
} else {
// this should be impossible to reach, but just for safety's sake...
Expand All @@ -228,11 +228,10 @@ - (BOOL)xmppStream:(XMPPStream *)stream didReceiveIQ:(XMPPIQ *)iq
NSString *type = [iq type];

if ([type isEqualToString:@"result"] || [type isEqualToString:@"error"]) {
NSLog(@"invoking with iq: %@", iq);
return [xmppIDTracker invokeForElement:iq withObject:iq];
}

return NO;
}

@end
@end

0 comments on commit 97aef5a

Please sign in to comment.