Join an Existing MCP XMPP Owner Privilege Room Using iOS Openfire and Robbie Hanson Library

I am joining an existing MUC room using the following code:

XMPPRoomMemoryStorage *roomStorage = [[XMPPRoomMemoryStorage alloc] init];
XMPPJID *roomJID = [XMPPJID jidWithString:@"newRoom5@conference.administrator"];

xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:roomStorage
                                                       jid:roomJID
                                             dispatchQueue:dispatch_get_main_queue()];
[xmppRoom activate:[self appDelegate].xmppStream];
[xmppRoom addDelegate:self
        delegateQueue:dispatch_get_main_queue()];
[xmppRoom joinRoomUsingNickname:[self appDelegate].xmppStream.myJID.user
                        history:nil
                       password:nil];
XMPPMUC * xmppMUC = [[XMPPMUC alloc] initWithDispatchQueue:dispatch_get_main_queue()];
[xmppMUC   activate:[self appDelegate].xmppStream];
[xmppMUC addDelegate:self delegateQueue:dispatch_get_main_queue()];

and after the user joins the room, I try to change their owner rights without using the user who created the room (the actual owner account):

- (void)xmppRoomDidJoin:(XMPPRoom *)sender {
//    ADD USERS TO OWNERS LIST
    [xmppRoom editRoomPrivileges:@[[XMPPRoom itemWithAffiliation:@"owner" jid:[XMPPJID jidWithString:[self appDelegate].xmppStream.myJID.user]]]];
}

And I get an error that I do not know for sure if this is related:

RECV: <iq xmlns="jabber:client" type="error"
          id="64BBA616-56D7-4CB1-AC07-CBEA4C37E98C" 
          from="newroom5@conference.administrator" 
          to="newuser236@administrator/26ee7a3d">
        <query xmlns="http://jabber.org/protocol/muc#admin">
          <item affiliation="member" jid="newuser236"/>
        </query>
        <error code="403" type="auth">
          <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        </error>
      </iq>

and the user is not added to the list of owners in Openfire.

I also want to add that I installed:

publicRoom : 1 
moderated : 0
membersOnly : 0 
canInvite : 1 
roomPassword : nil 
canRegister : 1 
canDiscoverJID : 1 
logEnabled : 1

Any suggestions on how to add a user who has just joined the number on the owners list? as well as any ideas why I get an error?

+4
1

xmpp, PHP, , PHP- DB .

0

All Articles