@@ -1,6 +1,7 @@ #import "XMPPConnection.h" +#import "XMPPStanza.h" #define NS_BIND @"urn:ietf:params:xml:ns:xmpp-bind" #define NS_CLIENT @"jabber:client" #define NS_SASL @"urn:ietf:params:xml:ns:xmpp-sasl" #define NS_STREAM @"http://etherx.jabber.org/streams" @@ -133,12 +134,11 @@ [sock writeString: [authTag stringValue]]; } - (void)_sendResourceBind { - OFXMLElement *iq = [OFXMLElement elementWithName: @"iq"]; - [iq addAttributeWithName: @"type" stringValue: @"set"]; + XMPPIQ *iq = [XMPPIQ IQWithType: @"set" ID: @"bind0"]; [iq addChild: [OFXMLElement elementWithName: @"bind" namespace: NS_BIND]]; [sock writeString: [iq stringValue]]; }