mod_muc_occupant_id/mod_muc_occupant_id.lua
changeset 3835 435f5b4ebd06
parent 3833 f20a5d28910f
child 3838 2f189f022b84
equal deleted inserted replaced
3834:63d8072dc864 3835:435f5b4ebd06
    42 	stanza:remove_children("occupant-id", xmlns_occupant_id);
    42 	stanza:remove_children("occupant-id", xmlns_occupant_id);
    43 
    43 
    44 	local occupant_tag = occupant.sessions[stanza.attr.from]
    44 	local occupant_tag = occupant.sessions[stanza.attr.from]
    45 		:get_child("occupant-id", xmlns_occupant_id);
    45 		:get_child("occupant-id", xmlns_occupant_id);
    46 
    46 
    47 	local unique_id = nil;
    47 	local unique_id;
    48 	if occupant_tag == nil then
    48 	if occupant_tag == nil then
    49 		unique_id = generate_id(occupant, room);
    49 		unique_id = generate_id(occupant, room);
    50 	else
    50 	else
    51 		unique_id = occupant.sessions[stanza.attr.from]
    51 		unique_id = occupant.sessions[stanza.attr.from]
    52 			:get_child("occupant-id", xmlns_occupant_id)
    52 			:get_child("occupant-id", xmlns_occupant_id)