i'm trying solution given at List of chat room members but . But from this link i'm confuse where to put 'editRoomPrivileges' method. i'm facing exact issue of affiliation permission . i tried to set every participants affiliation permission to 'member' from group owner account but i'm getting 'not allowed' error in method
- (void) xmppRoom:(XMPPRoom *)sender didNotEditPrivileges:(XMPPIQ *)iqError
I think group owner by defauld have permission to modify affiliations. room is of type of persistent and public .
i have invited user like this ,
- (void) xmppRoomDidCreate: (XMPPRoom *)sender
{
//ArrNewRoomInfo contain multiple user to be included in room
for (int k=0; k < ArrNewRoomInfo.count; k++)
{
NSString *pureNumbers = [[[[ArrNewRoomInfo objectAtIndex:k] valueForKey:@"mobno"] componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""];
NSString *strInvitedUserName = [NSString stringWithFormat:@"%@@elmajabber",pureNumbers];
[sender editRoomPrivileges:@[[XMPPRoom itemWithAffiliation:@"member" jid:[XMPPJID jidWithString:strInvitedUserName]]]];
[sender inviteUser:[XMPPJID jidWithString:strInvitedUserName] withMessage:[NSString stringWithFormat:@"%@",[[ArrNewRoomInfo objectAtIndex:k] valueForKey:@"GroupName"]]];
}
}
please help me to get room member list.