# HG changeset patch # User Kim Alvefur # Date 1382955002 -3600 # Node ID 1b55d8f86644730adaca3faf25363adaefe156ac # Parent a234ad611633076ca055b56abb42028ea48b2bf9 mod_blocking: Make sure that there is a lists item in the privacy store diff -r a234ad611633 -r 1b55d8f86644 mod_blocking/mod_blocking.lua --- a/mod_blocking/mod_blocking.lua Thu Oct 24 11:52:58 2013 -0400 +++ b/mod_blocking/mod_blocking.lua Mon Oct 28 11:10:02 2013 +0100 @@ -9,6 +9,9 @@ function add_blocked_jid(username, host, jid) local privacy_lists = datamanager.load(username, host, "privacy") or {lists = {}}; local default_list_name = privacy_lists.default; + if not privacy_lists.lists then + privacy_lists.lists = {} + end if not default_list_name then default_list_name = "blocklist"; privacy_lists.default = default_list_name;