Add support for requesting a certain resource

This commit is contained in:
Florian Zeitz 2011-02-13 02:07:36 +01:00
parent 6dc9e5e217
commit 4cd1853729

View file

@ -207,8 +207,12 @@
- (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];
}