Mon, 30 Mar 2009 02:02:59 +0500
Fixed: rostermanager: Create new roster item if one doesn't exist on subscription approval (fixes issue #77)
core/rostermanager.lua | file | annotate | diff | comparison | revisions |
--- a/core/rostermanager.lua Mon Mar 30 01:57:51 2009 +0500 +++ b/core/rostermanager.lua Mon Mar 30 02:02:59 2009 +0500 @@ -224,6 +224,10 @@ if is_contact_pending_in(username, host, jid) then local roster = load_roster(username, host); local item = roster[jid]; + if not item then -- FIXME should roster item be auto-created? + item = {subscription = "none", groups = {}}; + roster[jid] = item; + end if item.subscription == "none" then item.subscription = "from"; else -- subscription == to