Implement isEqual: for XMPPJID
This commit is contained in:
parent
8d6c591fa2
commit
b976d0280c
1 changed files with 20 additions and 0 deletions
|
@ -225,4 +225,24 @@
|
||||||
{
|
{
|
||||||
return [self fullJID];
|
return [self fullJID];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)isEqual: (id)object
|
||||||
|
{
|
||||||
|
XMPPJID *otherJID;
|
||||||
|
|
||||||
|
if (object == self)
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
if (![object isKindOfClass: [XMPPJID class]])
|
||||||
|
return NO;
|
||||||
|
|
||||||
|
otherJID = object;
|
||||||
|
|
||||||
|
if ([node isEqual: [otherJID node]] &&
|
||||||
|
[domain isEqual: [otherJID domain]] &&
|
||||||
|
[resource isEqual: [otherJID resource]])
|
||||||
|
return YES;
|
||||||
|
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue