Hi, all!
Please help me!
I have a problem with room configuration form.
In this for there is field “muc#roomconfig_allowinvites” in description says “Whether to Allow Occupants to Invite Others”, but that a try set false and true, and nothing change, I always can invite others occupants.
And second question: how I can check this value before inviting, may be i can check this value and disable invite in my code?
Thanks,
Vitaly Parfonov
Any ideas!
Any budy have problem like that?
Hi,
Are you attempting to configure this from a client application? If so, can you capture the XML log during the process?
daryl
Hi, thanks for reply!
We develop client in JavaScript that work in browser and for sending information from client to server we use JSON format, so I can show you form that send client to server after creation room (in JSON).
{"roomname":"test", "persistentroom":false, "presencebroadcast":["moderator", "participant", "visitor"],
"whois":["anyone"], "roomdesc":"test", "maxusers":["30"], "publicroom":true, "membersonly":false,
**"allowinvites"****:false**, "reservednick":false, "passwordprotectedroom":false, "roomsecret":"",
"moderatedroom":false,"roomadmins":[], "roomowners":["root@localhost"]}.
As you can see ****"allowinvites" set false**** but any members of group chat can invite other user!!!
But may be problem come not from Smack library, because in standalone client like Pidgin and Gajim i see
same situation, i try create room group chat in this application and can invite other user any time
without reference to ********"allowinvites"******** value.
Best regards,
Vitaly
Hi,
The JSON code you have is not used by openfire, unless you have some sort of plugin or so… Within the database, this is stored as a 1 or 0.
Is this room members only?
daryl
Hi,
yes i know that openfire not support JSON format, i transform it to bean and filing answer form for MultiUserChat.
Is this room members only?
Is it important? This option work only if room members only? If yes how i can check this value before inviting?
Thanks,
Vetaly
Hi,
Yup, the allowInvite only works when the room is members only.
checking for it should be a call to isMembersOnly() of the room object or checking the database.
daryl
Thanks, for you help i almost understand, but i have one more question.
I can check that room is members only geting RoomInfo.isMembersOnly(), but how i can check allowinvites value?
canOccupantsInvite()
Check out the source code of LocalMUCRoom.java here:
http://www.igniterealtime.org/fisheye/browse/~raw,r=10438/svn-org/openfire/trunk /src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoom.java
daryl
Hi, again!
Maybe i stubid, but i can’t understand!
From your last message i see how it work on Openfire service, but how i can do something like canOccupantsInvite() on the Smack library.
I try do it with DiscoverInfo but not successfully.
Steps i create two group chat: room2 and room3 (see attach please):
Then i get DiscoverInfo of this room i dont find value that allow or not inviting:
Thanks,
Vitaly