Set the default namespace and prefixes when creating a new XMPPStanza.
This commit is contained in:
parent
9547bd112f
commit
59cb0a7954
1 changed files with 8 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#import "XMPPConnection.h"
|
||||||
#import "XMPPStanza.h"
|
#import "XMPPStanza.h"
|
||||||
#import "XMPPJID.h"
|
#import "XMPPJID.h"
|
||||||
|
|
||||||
|
@ -93,7 +94,9 @@
|
||||||
@throw [OFInvalidArgumentException newWithClass: isa
|
@throw [OFInvalidArgumentException newWithClass: isa
|
||||||
selector: _cmd];
|
selector: _cmd];
|
||||||
|
|
||||||
[self setDefaultNamespace: @"jabber:client"];
|
[self setDefaultNamespace: XMPP_NS_CLIENT];
|
||||||
|
[self setPrefix: @"stream"
|
||||||
|
forNamespace: XMPP_NS_STREAM];
|
||||||
|
|
||||||
if (type_ != nil)
|
if (type_ != nil)
|
||||||
[self setType: type_];
|
[self setType: type_];
|
||||||
|
@ -137,6 +140,10 @@
|
||||||
enumerator = [[elem children] objectEnumerator];
|
enumerator = [[elem children] objectEnumerator];
|
||||||
while ((el = [enumerator nextObject]) != nil)
|
while ((el = [enumerator nextObject]) != nil)
|
||||||
[self addChild: el];
|
[self addChild: el];
|
||||||
|
|
||||||
|
[self setDefaultNamespace: XMPP_NS_CLIENT];
|
||||||
|
[self setPrefix: @"stream"
|
||||||
|
forNamespace: XMPP_NS_STREAM];
|
||||||
} @catch (id e) {
|
} @catch (id e) {
|
||||||
[self release];
|
[self release];
|
||||||
@throw e;
|
@throw e;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue