2

Read This

First of all i want is to create a MUC room with some default setting.Here is what i have did.

-created the service on openfire -set default room settings(like make room persistent,members only etc.) -Now created a muc room from android side as per this answer Create MUC Room and Set Configuration and then i have applied configuration after creating room. here is what is being sent.

<iq id="r4ik2-24" to="roomId@conference.hostname" type="set">
  <query
    xmlns="http://jabber.org/protocol/muc#owner">
    <x
        xmlns="jabber:x:data" type="submit">
        <field var="FORM_TYPE" type="hidden">
            <value>http://jabber.org/protocol/muc#roomconfig</value>
        </field>
        <field var="muc#roomconfig_roomowners" type="jid-multi">
            <value>owner@hostname</value>
        </field>
    </x>
 </query>
</iq>

It will apply default room setting to this room. It works well and invited users can also join the room.Before sending this form to server room's properties are same as default properties(like it is persistent,members only)

But it will be applied after i send this form to server.otherwise recipients will get 404 error as stated in above question.

What I Want : Apply these Configuration from server side as the room is created.There should no need to send the config form from room owner after creating it.

What I Did : I have developed a plugin which listens to each n every MUC event like (room created,occupant joined etc.)

Now when the room is created i have got MUCROOM object for that room using below code

  XMPPServer server = XMPPServer.getInstance();
  MultiUserChatManager manager = server.getMultiUserChatManager();
  MultiUserChatService conference = manager.getMultiUserChatServices().get(0);
  MUCRoom mucRoom = conference.getChatRoom(roomName);

Now how can i apply that configuration to that room.?Any help will be appreciated.

Thanks.

NOTE : I want it to apply Configuration from server side not client side

Community
  • 1
  • 1
Nirav Tukadiya
  • 3,171
  • 1
  • 16
  • 35

0 Answers0