Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -205,12 +205,16 @@ } - (void)_sendResourceBind { XMPPIQ *iq = [XMPPIQ IQWithType: @"set" ID: @"bind0"]; - [iq addChild: [OFXMLElement elementWithName: @"bind" - namespace: NS_BIND]]; + OFXMLElement *bind = [OFXMLElement elementWithName: @"bind" + namespace: NS_BIND]; + if (resource) + [bind addChild: [OFXMLElement elementWithName: @"resource" + stringValue: resource]]; + [iq addChild: bind]; [self sendStanza: iq]; } - (void)_handleResourceBind: (XMPPIQ*)iq