baiwyc119 / lxmppd

Automatically exported from code.google.com/p/lxmppd
0 stars 0 forks source link

mod_muc: Empty form not accepted (for instant room creation flow) #377

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Try to create instant room from strophe.js muc plugin, sending:

<presence from=​"125@denwaip-pbx" 
to=​"125_1387568458577@conference.denwaip-pbx/​125" 
xmlns=​"jabber:​client">​
<x xmlns=​"http:​/​/​jabber.org/​protocol/​muc">​</x>​
</presence>​

<iq to=​"125_1387568458577@conference.denwaip-pbx" type=​"set" 
xmlns=​"jabber:​client" id=​"3967:​sendIQ">​
<query xmlns=​"http:​/​/​jabber.org/​protocol/​muc#owner">​
<x xmlns=​"jabber:​x:​data" type=​"submit">​</x>​
</query>​
</iq>​

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' 
from='125_1387568458577@conference.denwaip-pbx/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' 
from='125_1387568458577@conference.denwaip-pbx' 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>
</body>

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".

http://xmpp.org/extensions/xep-0045.html#createroom-instant

Original issue reported on code.google.com by psanpie...@gmail.com on 20 Dec 2013 at 8:02

GoogleCodeExporter commented 9 years ago
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.

Original comment by MWild1 on 21 Dec 2013 at 4:04

GoogleCodeExporter commented 9 years ago
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.

Thanks again.

Original comment by psanpie...@gmail.com on 23 Dec 2013 at 3:40

GoogleCodeExporter commented 9 years ago
Instant room support was added to trunk in 
https://hg.prosody.im/trunk/rev/4d334d00c635

Original comment by q...@daurnimator.com on 6 Sep 2014 at 10:30