The relavant code is:
// sending the initial presence to the room so we can create it
$conn->sendInitialRoomPresence($room);
$payload = $conn->processUntil('initial_room_enter', XMPP_API_PROCESS_TIMEOUT);
if ($payload[0][1] != 'result') {
_xmpp_api_disconnect($conn);
watchdog('xmpp_api', '@name does not have privileges to create muc rooms', array('@name' => XMPP_API_ADMINJID), WATCHDOG_ERROR);
return FALSE;
}
In my ejabberd log, it shows that it created the room, and I can see the room being created, so the test for insufficient privileges isn't right.
When I remove that if statement, a room is created, but the browser stays in "loading" state until I join the room (using Pidgin for eg.) Then the browser reports successful room creation, which is correct.
However, the room has the temporary name, so I might have to change the code to just use the right name the first time.
Comments
Comment #1
fizk commentedComment #2
darren.ferguson commentedMM not sure exactly why that would happen, however i normally utilize the xmlrpc interface to create the rooms, so i will have to dig into this issue with ejabberd and the xmpp_api
Comment #3
fizk commentedThis helps a little bit, the only problem now is that I have to join the room manually (with Pidigin) for the process to complete.
xmppframework/contrib/xmpp_api/xmpp_api.internal.inc::xmpp_api_create_muc()to
Comment #4
fizk commentedHere's where it gets stuck:
Start receiving response:
Continue receiving the previous response..... ??? bizzar. As though the buffer needs to be flushed.
Comment #5
fizk commentedSo why are we waiting for "initial_room_enter"? Maybe we should be waiting for another event. Is this event documented in ejabberd or XMPP standard?
Comment #6
fizk commentedIt seems the vendor library is speaking GroupChat 1.0, not Basic MUC, because it's sending:
instead of:
Comment #7
fizk commentedFIXED!
1. Call $conn->configureMucRoom($room); twice
2. Change
$values['data'] = $options[$key];to$packet[$key]['data'] = $options[$key];#1 fixes the response problem. #2 is a separate bug fix.
Comment #8
fizk commentedComment #9
darren.ferguson commentedCan you provide a patch for this so it can be verified, i have no idea where these are going to go currently.
Thanks
Comment #10
fizk commentedThis has four bug fixes.
Comment #11
fizk commentedBtw, I've seen some empty
$Idtags, is that how it comes out for non-dev releases?I'm using
$Id$(two $'s)