diff --git a/src/XMPPDiscoEntity.h b/src/XMPPDiscoEntity.h index 4b90807..d986963 100644 --- a/src/XMPPDiscoEntity.h +++ b/src/XMPPDiscoEntity.h @@ -56,7 +56,6 @@ * connection. * * \param connection The XMPPConnection to serve responses on. - * This must already be bound to a resource) * \return A new autoreleased XMPPDiscoEntity */ + discoEntityWithConnection: (XMPPConnection*)connection; @@ -66,7 +65,6 @@ * connection. * * \param connection The XMPPConnection to serve responses on. - * This must already be bound to a resource) * \param capsNode The node advertised for the entity's capabilites * \return A new autoreleased XMPPDiscoEntity */ diff --git a/src/XMPPDiscoEntity.m b/src/XMPPDiscoEntity.m index 47a0ee8..45b6973 100644 --- a/src/XMPPDiscoEntity.m +++ b/src/XMPPDiscoEntity.m @@ -107,6 +107,12 @@ return [caps SHA1Hash]; } +- (void)connection: (XMPPConnection*)connection + wasBoundToJID: (XMPPJID*)JID +{ + _JID = [JID copy]; +} + - (BOOL)connection: (XMPPConnection*)connection didReceiveIQ: (XMPPIQ*)IQ { diff --git a/src/XMPPDiscoNode.m b/src/XMPPDiscoNode.m index 92abad5..fe400d2 100644 --- a/src/XMPPDiscoNode.m +++ b/src/XMPPDiscoNode.m @@ -60,11 +60,6 @@ self = [super init]; @try { - if (JID == nil) - @throw [OFInvalidArgumentException - exceptionWithClass: [self class] - selector: _cmd]; - _JID = [JID copy]; _node= [node copy]; _name = [name copy];