Comparison

core/rostermanager.lua @ 8356:bbd18b617296

rostermanager: Simplify logging.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 19 Sep 2017 19:17:07 +0200
parent 8147:d44c6582059d
child 8357:8b5d846dc664
comparison
equal deleted inserted replaced
8355:45383e071ded 8356:bbd18b617296
102 local user = bare_sessions[jid]; 102 local user = bare_sessions[jid];
103 local roster; 103 local roster;
104 if user then 104 if user then
105 roster = user.roster; 105 roster = user.roster;
106 if roster then return roster; end 106 if roster then return roster; end
107 log("debug", "load_roster: loading for new user: %s@%s", username, host); 107 log("debug", "load_roster: loading for new user: %s", jid);
108 else -- Attempt to load roster for non-loaded user 108 else -- Attempt to load roster for non-loaded user
109 log("debug", "load_roster: loading for offline user: %s@%s", username, host); 109 log("debug", "load_roster: loading for offline user: %s", jid);
110 end 110 end
111 local roster_store = storagemanager.open(host, "roster", "keyval"); 111 local roster_store = storagemanager.open(host, "roster", "keyval");
112 local data, err = roster_store:get(username); 112 local data, err = roster_store:get(username);
113 roster = data or {}; 113 roster = data or {};
114 if user then user.roster = roster; end 114 if user then user.roster = roster; end