aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-07-26 15:28:04 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-07-26 15:28:04 +0500
commit8bba19d6205ab8983abd749add2a1b1c561f1296 (patch)
treea37d9f1311e2e93fc30da2ff10eb11fae61bd6fd
parent33fa4514f474cec4c377ac9d8f68ec090a06d555 (diff)
downloadprosody-8bba19d6205ab8983abd749add2a1b1c561f1296.tar.gz
prosody-8bba19d6205ab8983abd749add2a1b1c561f1296.zip
ejabberdsql2prosody: Fixed: pending-in subscriptions could halt processing
-rw-r--r--tools/ejabberdsql2prosody.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/ejabberdsql2prosody.lua b/tools/ejabberdsql2prosody.lua
index 772f9214..6fd73fdd 100644
--- a/tools/ejabberdsql2prosody.lua
+++ b/tools/ejabberdsql2prosody.lua
@@ -195,7 +195,7 @@ function roster_pending(node, host, jid)
roster.pending = roster.pending or {};
roster.pending[jid] = true;
local ret, err = dm.store(node, host, "roster", roster);
- print("["..(err or "success").."] roster: " ..node.."@"..host.." - "..jid);
+ print("["..(err or "success").."] roster-pending: " ..node.."@"..host.." - "..jid);
end
function roster_group(node, host, jid, group)
local roster = dm.load(node, host, "roster") or {};
@@ -203,7 +203,7 @@ function roster_group(node, host, jid, group)
if not item then print("Warning: No roster item "..jid.." for user "..user..", can't put in group "..group); return; end
item.groups[group] = true;
local ret, err = dm.store(node, host, "roster", roster);
- print("["..(err or "success").."] roster: " ..node.."@"..host.." - "..jid);
+ print("["..(err or "success").."] roster-group: " ..node.."@"..host.." - "..jid.." - "..group);
end
for i, row in ipairs(t["rosterusers"] or NULL) do
local node, contact = row.username, row.jid;
@@ -226,7 +226,6 @@ for i, row in ipairs(t["rosterusers"] or NULL) do
ask = "subscribe";
elseif ask == "I" then
roster_pending(node, host, contact);
- return;
else error("Unknown ask type: "..ask); end
local item = {name = name, ask = ask, subscription = subscription, groups = {}};
roster(node, host, contact, item);