0

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.

Community
  • 1
  • 1
RamjanSayyad
  • 45
  • 10
  • Hi, Did you found a solution for this? – Shruti Oct 09 '15 at 06:19
  • hi,yes i got solution for this...i got 'not allowed' error because of server configuration . if you are facing same issue please look at your server end setting and make them As follows {access, muc_admin, [{allow, admin}]}. {modules, [ {mod_muc, [ {access_admin, muc_admin}, ... ]}. – RamjanSayyad Oct 26 '15 at 11:06
  • And you can use editRoomPrivileges: after inviteUser: directly – RamjanSayyad Oct 26 '15 at 11:12

0 Answers0