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

Reporter psanpietro
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Priority-Medium
  • Milestone-0.9
  • Type-Defect
  • Status-Fixed
  1. psanpietro on

    *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

  2. MattJ on

    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.

    Changes
    • tags Status-Accepted
    • title mod_muc: Empty form not accepted (for instant room creation flow)
    • owner MattJ
  3. psanpietro on

    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.

  4. quae@daurnimator.com on

    Instant room support was added to trunk in https://hg.prosody.im/trunk/rev/4d334d00c635

  5. Zash on

    Simple fix, I think I'll do this in 0.9

    Changes
    • owner MattJ Zash
    • tags Status-Started Milestone-0.9
  6. Zash on

    Fixed in https://hg.prosody.im/0.9/rev/69827ee1f951

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.