Currently i am making chat application.
I will implement Group chat exit same like Whats app.
For example, I am group owner and after some time i will leave from Group.After i leaving from group any one member of the Group assign as a Group owner.
For that i applied following code :
1st fetch all members in the groupchat and then all members left groupchat manually but it also not working.
NSXMLElement *query = [NSXMLElement elementWithName:@"query" xmlns:@"http://jabber.org/protocol/muc#admin"];
NSXMLElement *item = [NSXMLElement elementWithName:@"item"];
[item addAttributeWithName:@"affiliation" stringValue:@"member"];
[item addAttributeWithName:@"jid" stringValue:@"jid to remove"];
[query addChild:item];
XMPPIQ *RemoveUser = [[XMPPIQ alloc] initWithType:@"set" to:[XMPPJID jidWithString:[NSString stringWithFormat:@"%@@%@",dialuser2,kSIPDomain]] elementID:@"some random id" child:query];
[SharedAppDelegate.xmppStream sendElement:RemoveUser];
so any one have code or related information then please help me.
Thank you.