Software /
code /
prosody
Comparison
tools/ejabberd2prosody.lua @ 1784:b2bfd3b93da6
ejabberd2prosody: Fixed a problem with null roster groups.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 18 Sep 2009 05:16:26 +0500 |
parent | 1782:dd819e5bb0b8 |
child | 2693:e60494fbf23f |
comparison
equal
deleted
inserted
replaced
1783:f79972ad8965 | 1784:b2bfd3b93da6 |
---|---|
102 roster_pending(node, host, contact); | 102 roster_pending(node, host, contact); |
103 ask = "subscribe"; | 103 ask = "subscribe"; |
104 else error("Unknown ask type: "..ask); end | 104 else error("Unknown ask type: "..ask); end |
105 if subscription ~= "both" and subscription ~= "from" and subscription ~= "to" and subscription ~= "none" then error(subscription) end | 105 if subscription ~= "both" and subscription ~= "from" and subscription ~= "to" and subscription ~= "none" then error(subscription) end |
106 local item = {name = name, ask = ask, subscription = subscription, groups = {}}; | 106 local item = {name = name, ask = ask, subscription = subscription, groups = {}}; |
107 for _, g in ipairs(groups) do item.groups[g] = true; end | 107 for _, g in ipairs(groups) do |
108 if type(g) == "string" then | |
109 item.groups[g] = true; | |
110 end | |
111 end | |
108 roster(node, host, contact, item); | 112 roster(node, host, contact, item); |
109 end; | 113 end; |
110 private_storage = function(tuple) | 114 private_storage = function(tuple) |
111 private_storage(tuple[2][1], tuple[2][2], tuple[2][3], build_stanza(tuple[3])); | 115 private_storage(tuple[2][1], tuple[2][2], tuple[2][3], build_stanza(tuple[3])); |
112 end; | 116 end; |