44 session:close({condition = "not-authorized", text = "Account deleted"}); |
44 session:close({condition = "not-authorized", text = "Account deleted"}); |
45 end |
45 end |
46 -- TODO datamanager should be able to delete all user data itself |
46 -- TODO datamanager should be able to delete all user data itself |
47 datamanager.store(username, host, "vcard", nil); |
47 datamanager.store(username, host, "vcard", nil); |
48 datamanager.store(username, host, "private", nil); |
48 datamanager.store(username, host, "private", nil); |
49 datamanager.store(username, host, "offline", nil); |
49 datamanager.list_store(username, host, "offline", nil); |
50 local bare = username.."@"..host; |
50 local bare = username.."@"..host; |
51 for jid, item in pairs(roster) do |
51 for jid, item in pairs(roster) do |
52 if jid and jid ~= "pending" then |
52 if jid and jid ~= "pending" then |
53 if item.subscription == "both" or item.subscription == "from" or (roster.pending and roster.pending[jid]) then |
53 if item.subscription == "both" or item.subscription == "from" or (roster.pending and roster.pending[jid]) then |
54 core_post_stanza(hosts[host], st.presence({type="unsubscribed", from=bare, to=jid})); |
54 core_post_stanza(hosts[host], st.presence({type="unsubscribed", from=bare, to=jid})); |