Fix namespace handling.

This commit is contained in:
Jonathan Schleifer 2011-05-12 19:49:58 +02:00
parent 1ffd66aa92
commit d80aa353d3
4 changed files with 9 additions and 1 deletions

View file

@ -695,6 +695,7 @@
if (resource != nil)
[bind addChild: [OFXMLElement elementWithName: @"resource"
namespace: XMPP_NS_BIND
stringValue: resource]];
[iq addChild: bind];

View file

@ -22,6 +22,7 @@
*/
#import "XMPPMessage.h"
#import "XMPPConnection.h"
@implementation XMPPMessage
+ message
@ -75,6 +76,7 @@
- (void)addBody: (OFString*)body
{
[self addChild: [OFXMLElement elementWithName: @"body"
namespace: XMPP_NS_CLIENT
stringValue: body]];
}
@end

View file

@ -22,6 +22,7 @@
*/
#import "XMPPPresence.h"
#import "XMPPConnection.h"
@implementation XMPPPresence
+ presence
@ -75,12 +76,14 @@
- (void)addShow: (OFString*)show
{
[self addChild: [OFXMLElement elementWithName: @"show"
namespace: XMPP_NS_CLIENT
stringValue: show]];
}
- (void)addStatus: (OFString*)status
{
[self addChild: [OFXMLElement elementWithName: @"status"
namespace: XMPP_NS_CLIENT
stringValue: status]];
}
@ -88,6 +91,7 @@
{
OFString* prio = [OFString stringWithFormat: @"%" @PRId8, priority];
[self addChild: [OFXMLElement elementWithName: @"priority"
namespace: XMPP_NS_CLIENT
stringValue: prio]];
}
@end

View file

@ -86,7 +86,8 @@
type: (OFString*)type_
ID: (OFString*)ID_
{
self = [super initWithName: name_];
self = [super initWithName: name_
namespace: XMPP_NS_CLIENT];
@try {
if (![name_ isEqual: @"iq"] && ![name_ isEqual: @"message"] &&