@@ -1,7 +1,7 @@ /* - * Copyright (c) 2011, 2012, 2013, 2019, Jonathan Schleifer + * Copyright (c) 2011, 2012, 2013, 2019, 2021, Jonathan Schleifer * Copyright (c) 2011, Florian Zeitz * * https://heap.zone/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any @@ -40,58 +40,50 @@ + (instancetype)messageWithType: (OFString *)type { return [[[self alloc] initWithType: type] autorelease]; } -+ (instancetype)messageWithType: (OFString *)type - ID: (OFString *)ID ++ (instancetype)messageWithType: (OFString *)type ID: (OFString *)ID { - return [[[self alloc] initWithType: type - ID: ID] autorelease]; + return [[[self alloc] initWithType: type ID: ID] autorelease]; } - (instancetype)init { - return [self initWithType: nil - ID: nil]; + return [self initWithType: nil ID: nil]; } - (instancetype)initWithID: (OFString *)ID { - return [self initWithType: nil - ID: ID]; + return [self initWithType: nil ID: ID]; } - (instancetype)initWithType: (OFString *)type { - return [self initWithType: type - ID: nil]; + return [self initWithType: type ID: nil]; } -- (instancetype)initWithType: (OFString *)type - ID: (OFString *)ID +- (instancetype)initWithType: (OFString *)type ID: (OFString *)ID { - return [super initWithName: @"message" - type: type - ID: ID]; + return [super initWithName: @"message" type: type ID: ID]; } - (void)setBody: (OFString *)body { OFXMLElement *oldBody = [self elementForName: @"body" - namespace: XMPP_NS_CLIENT]; + namespace: XMPPClientNS]; if (oldBody != nil) [self removeChild: oldBody]; if (body != nil) [self addChild: [OFXMLElement elementWithName: @"body" - namespace: XMPP_NS_CLIENT + namespace: XMPPClientNS stringValue: body]]; } - (OFString *)body { return [self elementForName: @"body" - namespace: XMPP_NS_CLIENT].stringValue; + namespace: XMPPClientNS].stringValue; } @end