Remove more debugging code which was accidentally committed (don't trust hg)
[prosody.git] / core / rostermanager.lua
index fdaf64a7667858596212fa5dab9b3c3e2ce94054..867add2c1889b4b268f899f9f7c4fd93d473a590 100644 (file)
@@ -224,6 +224,10 @@ function subscribed(username, host, jid)
        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