plugins/mod_storage_xep0227.lua
changeset 12197 a6d2b536c41a
parent 12193 82c8e855c850
child 12198 9965d7d126c7
equal deleted inserted replaced
12196:6a772a0c0dfd 12197:a6d2b536c41a
    32 	module:log("debug", "Loaded %s", path);
    32 	module:log("debug", "Loaded %s", path);
    33 	local s = f:read("*a");
    33 	local s = f:read("*a");
    34 	f:close();
    34 	f:close();
    35 	return parse_xml_real(s);
    35 	return parse_xml_real(s);
    36 end
    36 end
    37 local function default_set_user_xml(user, host, xml)
    37 local function default_set_user_xml(self, user, host, xml)
    38 	local jid = jid_join(user, host);
    38 	local jid = jid_join(user, host);
    39 	local path = paths.join(prosody.paths.data, jid..".xml");
    39 	local path = paths.join(prosody.paths.data, jid..".xml");
    40 	local f, err = io_open(path, "w");
    40 	local f, err = io_open(path, "w");
    41 	if not f then return f, err; end
    41 	if not f then return f, err; end
    42 	if xml then
    42 	if xml then