diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-22 03:34:08 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-22 03:34:08 +0500 |
commit | a44b6261c9f4fa59f6fc057cd7965c6ce1f2cdb1 (patch) | |
tree | 05757b9fbbc0b66894648929857eda90ceed1483 /core/rostermanager.lua | |
parent | 3abe249511d244ba1875208aca4b6326d1227e4a (diff) | |
download | prosody-a44b6261c9f4fa59f6fc057cd7965c6ce1f2cdb1.tar.gz prosody-a44b6261c9f4fa59f6fc057cd7965c6ce1f2cdb1.zip |
rostermanager: Remove self-contacts from loaded rosters.
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r-- | core/rostermanager.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua index ddff841e..54c97083 100644 --- a/core/rostermanager.lua +++ b/core/rostermanager.lua @@ -89,6 +89,7 @@ function load_roster(username, host) log("debug", "load_roster: loading for new user: "..username.."@"..host); roster = datamanager.load(username, host, "roster") or {}; if not roster[false] then roster[false] = { }; end + roster[username.."@"..host] = nil; hosts[host].sessions[username].roster = roster; hosts[host].events.fire_event("roster-load", username, host, roster); end @@ -98,6 +99,7 @@ function load_roster(username, host) -- Attempt to load roster for non-loaded user log("debug", "load_roster: loading for offline user: "..username.."@"..host); roster = datamanager.load(username, host, "roster") or {}; + roster[username.."@"..host] = nil; hosts[host].events.fire_event("roster-load", username, host, roster); return roster; end |