-local mainlog = log;
-local function log(type, message)
- mainlog(type, "rostermanager", message);
-end
+
+local log = require "util.logger".init("rostermanager");
local setmetatable = setmetatable;
local format = string.format;
else
stanza:tag("item", {jid = jid, subscription = "remove"});
end
- stanza:up();
- stanza:up();
+ stanza:up(); -- move out from item
+ stanza:up(); -- move out from stanza
-- stanza ready
for _, session in pairs(hosts[host].sessions[username].sessions) do
if session.interested then
if item.subscription == "from" then
item.subscription = "none";
changed = true;
- elseif item.subscription == both then
+ elseif item.subscription == "both" then
item.subscription = "to";
changed = true;
end