aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2021-11-16 12:02:54 +0000
committerMatthew Wild <mwild1@gmail.com>2021-11-16 12:02:54 +0000
commitf5fd67c3e78b9251f8374910bfe58a00495cc02d (patch)
treea7f475cdae9ab68eead5b0dd99c3d170054343b4
parentbfd0d0a8a92b811feffed1fb48c1a7f85a1e8f31 (diff)
downloadprosody-f5fd67c3e78b9251f8374910bfe58a00495cc02d.tar.gz
prosody-f5fd67c3e78b9251f8374910bfe58a00495cc02d.zip
MUC: Set .previous_affiliation = "none" if nil, for consistency with .affiliation
It appears nothing currently uses this field in prosody or prosody-modules
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index bf5f093d..a62ad5c5 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -1429,7 +1429,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, reason, data)
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
};