MUC: Set .previous_affiliation = "none" if nil, for consistency with .affiliation
authorMatthew Wild <mwild1@gmail.com>
Tue, 16 Nov 2021 12:02:54 +0000
changeset 11914 3a8ec48f7333
parent 11913 b33d71c43ac0
child 11915 0e7dedd8b18d
MUC: Set .previous_affiliation = "none" if nil, for consistency with .affiliation It appears nothing currently uses this field in prosody or prosody-modules
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Tue Nov 16 11:54:32 2021 +0000
+++ b/plugins/muc/muc.lib.lua	Tue Nov 16 12:02:54 2021 +0000
@@ -1429,7 +1429,7 @@
 		jid = jid;
 		affiliation = affiliation or "none";
 		reason = reason;
-		previous_affiliation = target_affiliation;
+		previous_affiliation = target_affiliation or "none";
 		data = data and data or nil; -- coerce false to nil
 	};