Comparison

plugins/muc/muc.lib.lua @ 11910:3a8ec48f7333

MUC: Set .previous_affiliation = "none" if nil, for consistency with .affiliation It appears nothing currently uses this field in prosody or prosody-modules
author Matthew Wild <mwild1@gmail.com>
date Tue, 16 Nov 2021 12:02:54 +0000
parent 11909:b33d71c43ac0
child 11911:0e7dedd8b18d
comparison
equal deleted inserted replaced
11909:b33d71c43ac0 11910:3a8ec48f7333
1427 room = self; 1427 room = self;
1428 actor = actor; 1428 actor = actor;
1429 jid = jid; 1429 jid = jid;
1430 affiliation = affiliation or "none"; 1430 affiliation = affiliation or "none";
1431 reason = reason; 1431 reason = reason;
1432 previous_affiliation = target_affiliation; 1432 previous_affiliation = target_affiliation or "none";
1433 data = data and data or nil; -- coerce false to nil 1433 data = data and data or nil; -- coerce false to nil
1434 }; 1434 };
1435 1435
1436 module:fire_event("muc-pre-set-affiliation", event_data); 1436 module:fire_event("muc-pre-set-affiliation", event_data);
1437 if event_data.allowed == false then 1437 if event_data.allowed == false then