diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-09-13 14:46:24 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-09-13 14:46:24 +0100 |
commit | 69ef24b16a23ec3fbbf0c935977319f9000adfd4 (patch) | |
tree | 5f9bf30950e5df9d1237ec36cc7030fcd39dbd20 /plugins | |
parent | 51e1c400272c5a064ab3402e436f0f656c72b789 (diff) | |
download | prosody-69ef24b16a23ec3fbbf0c935977319f9000adfd4.tar.gz prosody-69ef24b16a23ec3fbbf0c935977319f9000adfd4.zip |
MUC: If a user with an existing affiliation registers, preserve that affiliation (thanks jc)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/register.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/register.lib.lua b/plugins/muc/register.lib.lua index f9841e06..21cb3f2f 100644 --- a/plugins/muc/register.lib.lua +++ b/plugins/muc/register.lib.lua @@ -174,7 +174,7 @@ local function handle_register_iq(room, origin, stanza) -- Checks passed, save the registration if registered_nick ~= desired_nick then local registration_data = { reserved_nickname = desired_nick }; - local ok, err_type, err_condition = room:set_affiliation(true, user_jid, "member", nil, registration_data); + local ok, err_type, err_condition = room:set_affiliation(true, user_jid, affiliation or "member", nil, registration_data); if not ok then origin.send(st.error_reply(stanza, err_type, err_condition)); return true; |