Software /
code /
prosody
Changeset
1596:4fcb2df97141
ejabberdsql2prosody: Fixed: pending-in subscriptions could halt processing
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 26 Jul 2009 15:28:04 +0500 |
parents | 1595:9551055b5344 |
children | 1597:84328a4df655 |
files | tools/ejabberdsql2prosody.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/ejabberdsql2prosody.lua Sun Jul 26 00:32:51 2009 +0500 +++ b/tools/ejabberdsql2prosody.lua Sun Jul 26 15:28:04 2009 +0500 @@ -195,7 +195,7 @@ 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 @@ 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 @@ 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);