#377 mod_muc: Empty form not accepted (for instant room creation flow)
*What steps will reproduce the problem?*
1. Try to create instant room from strophe.js muc plugin, sending:
<presence from="125@denwaip-pbx" to="firstname.lastname@example.org/125" xmlns="jabber:client">
<iq to="email@example.com" type="set" xmlns="jabber:client" id="3967:sendIQ">
<x xmlns="jabber:x:data" type="submit"></x>
The expected output is that the room is created and unlocked.
What I get instead is:
<body sid='f0c18f97-3899-48ce-9938-6103fb51c8e3' xmlns:stream='http://etherx.jabber.org/streams' xmlns='http://jabber.org/protocol/httpbind'>
<presence xmlns='jabber:client' to='125@denwaip-pbx/ab5d0fce-12f8-4bff-b940-7d8675c796b9' firstname.lastname@example.org/125'><x xmlns='http://jabber.org/protocol/muc#user'><item jid='125@denwaip-pbx/ab5d0fce-12f8-4bff-b940-7d8675c796b9' affiliation='owner' role='moderator'/><status code='110'/></x></presence>
<iq type='error' to='125@denwaip-pbx/ab5d0fce-12f8-4bff-b940-7d8675c796b9' email@example.com' id='3967:sendIQ' xmlns='jabber:client'><error type='cancel'><bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Form is not of type room configuration</text></error></iq>
I'm running prosody 0.9.1-1~lucid on Ubuntu 10.04.1 LTS.
On the client side I'm using strophe.js library with muc plugin.
If you look at the documentation, in order to create an instant room (accepting default room configuration) the room owner MUST decline an initial configuration form by sending an IQ set to the room@service itself containing a element qualified by the 'http://jabber.org/protocol/muc#owner' namespace, where the only child of the is an empty element that is qualified by the 'jabber:x:data' namespace and that possesses a 'type' attribute whose value is "submit".
Thanks, we'll take a look at this for 0.9.3 (0.9.2 is already frozen).
I'll note though that Prosody doesn't currently lock rooms, see issue 328 for some discussion about that and the reasons why. If you don't get code 201 in the reponse, the room is not locked and does not require you to submit any configuration form, empty or otherwise (this applies to any server).
If you need locking for some reason then in 0.10/trunk (for which you can get nightly builds: https://prosody.im/nightly ) you can try our experimental room locking by setting muc_room_locking = true in your config. If testing of this proves positive, we'll enable it by default in 0.10.
Hi, thanks for having taken a look at this.
I actually don't need the locking. I submitted this just for the error I was getting, when it was supposed to be ok.