Comparison

plugins/muc/muc.lib.lua @ 11909:b33d71c43ac0

MUC: Fix incorrect variable name (thanks luacheck)
author Matthew Wild <mwild1@gmail.com>
date Tue, 16 Nov 2021 11:54:32 +0000
parent 11908:624c14b77bb4
child 11910:3a8ec48f7333
comparison
equal deleted inserted replaced
11908:624c14b77bb4 11909:b33d71c43ac0
1432 previous_affiliation = target_affiliation; 1432 previous_affiliation = target_affiliation;
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.allowed == false then 1437 if event_data.allowed == false then
1438 local err = event_data.error or { type = "cancel", condition = "not-allowed" }; 1438 local err = event_data.error or { type = "cancel", condition = "not-allowed" };
1439 return nil, err.type, err.condition; 1439 return nil, err.type, err.condition;
1440 end 1440 end
1441 if affiliation and not data and event_data.data then 1441 if affiliation and not data and event_data.data then
1442 -- Allow handlers to add data when none was going to be set 1442 -- Allow handlers to add data when none was going to be set