aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-09-03 12:19:42 +0100
committerMatthew Wild <mwild1@gmail.com>2018-09-03 12:19:42 +0100
commitd7c86f2e6f7e23c7e6ae873aafcd20dd52730037 (patch)
treeef6f7f5228755b00d98666176bc870c4fd054eff /plugins/muc/muc.lib.lua
parent0da19da4a6d7d003733cf133baacd010c699c891 (diff)
downloadprosody-d7c86f2e6f7e23c7e6ae873aafcd20dd52730037.tar.gz
prosody-d7c86f2e6f7e23c7e6ae873aafcd20dd52730037.zip
MUC: Add some comments for clarity
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 435ca805..122536ec 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -70,6 +70,7 @@ function room_mt:new_occupant(bare_real_jid, nick)
return occupant;
end
+-- nick is in the form of an in-room JID
function room_mt:get_occupant_by_nick(nick)
local occupant = self._occupants[nick];
if occupant == nil then return nil end
@@ -1450,8 +1451,10 @@ function _M.restore_room(frozen, state)
room._affiliation_data = frozen._affiliation_data;
if frozen.jid and frozen._affiliations then
+ -- Old storage format
room._affiliations = frozen._affiliations;
else
+ -- New storage format
for jid, data in pairs(frozen) do
local node, host, resource = jid_split(jid);
if host:sub(1,1) ~= "_" and not resource and type(data) == "string" then