Comparison

plugins/muc/muc.lib.lua @ 10431:3db8372e203c 0.11

MUC: Keep role across nickname change (fixes #1466)
author Kim Alvefur <zash@zash.se>
date Sat, 23 Nov 2019 01:05:28 +0100
parent 10293:f9301d93de72
child 10434:8f709577fe8e
child 10690:27d15097c235
comparison
equal deleted inserted replaced
10410:659b577f280c 10431:3db8372e203c
522 dest_occupant = self:get_occupant_by_nick(dest_jid); 522 dest_occupant = self:get_occupant_by_nick(dest_jid);
523 if dest_occupant == nil then 523 if dest_occupant == nil then
524 log("debug", "no occupant found for %s; creating new occupant object for %s", dest_jid, real_jid); 524 log("debug", "no occupant found for %s; creating new occupant object for %s", dest_jid, real_jid);
525 is_first_dest_session = true; 525 is_first_dest_session = true;
526 dest_occupant = self:new_occupant(bare_jid, dest_jid); 526 dest_occupant = self:new_occupant(bare_jid, dest_jid);
527 if orig_occupant then
528 dest_occupant.role = orig_occupant.role;
529 end
527 else 530 else
528 is_first_dest_session = false; 531 is_first_dest_session = false;
529 end 532 end
530 end 533 end
531 local is_last_orig_session; 534 local is_last_orig_session;