File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ - (id)initWithType:(NSString *)type to:(XMPPJID *)jid elementID:(NSString *)eid
116
116
117
117
if (eid)
118
118
[self addAttributeWithName: @" id" stringValue: eid];
119
+ else
120
+ [self addAttributeWithName: @" id" stringValue: [[NSUUID UUID ] UUIDString ]];
119
121
120
122
if (childElement)
121
123
[self addChild: childElement];
Original file line number Diff line number Diff line change @@ -515,9 +515,7 @@ - (void)addUser:(XMPPJID *)jid withNickname:(NSString *)optionalName groups:(NSA
515
515
NSXMLElement *query = [NSXMLElement elementWithName: @" query" xmlns: @" jabber:iq:roster" ];
516
516
[query addChild: item];
517
517
518
- NSXMLElement *iq = [NSXMLElement elementWithName: @" iq" ];
519
- [iq addAttributeWithName: @" type" stringValue: @" set" ];
520
- [iq addChild: query];
518
+ XMPPIQ *iq = [XMPPIQ iqWithType: @" set" child: query];
521
519
522
520
[xmppStream sendElement: iq];
523
521
You can’t perform that action at this time.
0 commit comments