Fix namespace handling.
This commit is contained in:
parent
1ffd66aa92
commit
d80aa353d3
4 changed files with 9 additions and 1 deletions
|
@ -695,6 +695,7 @@
|
||||||
|
|
||||||
if (resource != nil)
|
if (resource != nil)
|
||||||
[bind addChild: [OFXMLElement elementWithName: @"resource"
|
[bind addChild: [OFXMLElement elementWithName: @"resource"
|
||||||
|
namespace: XMPP_NS_BIND
|
||||||
stringValue: resource]];
|
stringValue: resource]];
|
||||||
|
|
||||||
[iq addChild: bind];
|
[iq addChild: bind];
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "XMPPMessage.h"
|
#import "XMPPMessage.h"
|
||||||
|
#import "XMPPConnection.h"
|
||||||
|
|
||||||
@implementation XMPPMessage
|
@implementation XMPPMessage
|
||||||
+ message
|
+ message
|
||||||
|
@ -75,6 +76,7 @@
|
||||||
- (void)addBody: (OFString*)body
|
- (void)addBody: (OFString*)body
|
||||||
{
|
{
|
||||||
[self addChild: [OFXMLElement elementWithName: @"body"
|
[self addChild: [OFXMLElement elementWithName: @"body"
|
||||||
|
namespace: XMPP_NS_CLIENT
|
||||||
stringValue: body]];
|
stringValue: body]];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "XMPPPresence.h"
|
#import "XMPPPresence.h"
|
||||||
|
#import "XMPPConnection.h"
|
||||||
|
|
||||||
@implementation XMPPPresence
|
@implementation XMPPPresence
|
||||||
+ presence
|
+ presence
|
||||||
|
@ -75,12 +76,14 @@
|
||||||
- (void)addShow: (OFString*)show
|
- (void)addShow: (OFString*)show
|
||||||
{
|
{
|
||||||
[self addChild: [OFXMLElement elementWithName: @"show"
|
[self addChild: [OFXMLElement elementWithName: @"show"
|
||||||
|
namespace: XMPP_NS_CLIENT
|
||||||
stringValue: show]];
|
stringValue: show]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)addStatus: (OFString*)status
|
- (void)addStatus: (OFString*)status
|
||||||
{
|
{
|
||||||
[self addChild: [OFXMLElement elementWithName: @"status"
|
[self addChild: [OFXMLElement elementWithName: @"status"
|
||||||
|
namespace: XMPP_NS_CLIENT
|
||||||
stringValue: status]];
|
stringValue: status]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +91,7 @@
|
||||||
{
|
{
|
||||||
OFString* prio = [OFString stringWithFormat: @"%" @PRId8, priority];
|
OFString* prio = [OFString stringWithFormat: @"%" @PRId8, priority];
|
||||||
[self addChild: [OFXMLElement elementWithName: @"priority"
|
[self addChild: [OFXMLElement elementWithName: @"priority"
|
||||||
|
namespace: XMPP_NS_CLIENT
|
||||||
stringValue: prio]];
|
stringValue: prio]];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -86,7 +86,8 @@
|
||||||
type: (OFString*)type_
|
type: (OFString*)type_
|
||||||
ID: (OFString*)ID_
|
ID: (OFString*)ID_
|
||||||
{
|
{
|
||||||
self = [super initWithName: name_];
|
self = [super initWithName: name_
|
||||||
|
namespace: XMPP_NS_CLIENT];
|
||||||
|
|
||||||
@try {
|
@try {
|
||||||
if (![name_ isEqual: @"iq"] && ![name_ isEqual: @"message"] &&
|
if (![name_ isEqual: @"iq"] && ![name_ isEqual: @"message"] &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue