local function room_save(room, forced)
local node = jid_split(room.jid);
persistent_rooms[room.jid] = room._data.persistent;
- module:log("debug", "1, %s, %s", room.jid, tostring(room._data.persistent));
if room._data.persistent then
- module:log("debug", "2");
local history = room._data.history;
room._data.history = nil;
local data = {
datamanager.store(node, muc_host, "config", data);
room._data.history = history;
elseif forced then
- module:log("debug", "3");
datamanager.store(node, muc_host, "config", nil);
end
- module:log("debug", "4");
if forced then datamanager.store(nil, muc_host, "persistent", persistent_rooms); end
end
-- to the main muc domain
handle_to_domain(origin, stanza);
end);
+function component.send(stanza) -- FIXME do a generic fix
+ if stanza.attr.type == "result" or stanza.attr.type == "error" then
+ core_post_stanza(component, stanza);
+ else error("component.send only supports result and error stanzas at the moment"); end
+end
prosody.hosts[module:get_host()].muc = { rooms = rooms };