diff options
author | Kim Alvefur <zash@zash.se> | 2018-12-20 14:49:50 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-12-20 14:49:50 +0100 |
commit | 66b2c62b8956450927b9730e1d6cd395dc779e0e (patch) | |
tree | 5585523f0723978b54a09189a45ab054c89625d8 | |
parent | 065ad98d8b215fb8e7bdac1bdde66802b54721d6 (diff) | |
parent | 85a028c727564dd2426e2ada2eee1a0b14838a70 (diff) | |
download | prosody-66b2c62b8956450927b9730e1d6cd395dc779e0e.tar.gz prosody-66b2c62b8956450927b9730e1d6cd395dc779e0e.zip |
Merge 0.11->trunk
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 | ||||
-rw-r--r-- | spec/scansion/muc_register.scs | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 4eadc414..bb79cda6 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1247,7 +1247,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, reason, data) else local actor_affiliation = self:get_affiliation(actor); if actor_affiliation == "owner" then - if jid_bare(actor) == jid then -- self change + if jid_bare(actor) == jid and is_downgrade then -- self change -- need at least one owner local is_last = true; for j in self:each_affiliation("owner") do diff --git a/spec/scansion/muc_register.scs b/spec/scansion/muc_register.scs index 98af33f1..e1eaf4e0 100644 --- a/spec/scansion/muc_register.scs +++ b/spec/scansion/muc_register.scs @@ -504,3 +504,25 @@ Rosaline receives: <status xmlns='http://jabber.org/protocol/muc#user' code='110'/> </x> </presence> + +# Romeo sets their their own nickname via admin query (see #1273) +Romeo sends: + <iq to="room@conference.localhost" id="reserve" type="set"> + <query xmlns="http://jabber.org/protocol/muc#admin"> + <item nick="Romeo" affiliation="owner" jid="${Romeo's JID}"/> + </query> + </iq> + +Romeo receives: + <presence from="room@conference.localhost/Romeo"> + <x xmlns="http://jabber.org/protocol/muc#user"> + <item xmlns="http://jabber.org/protocol/muc#user" role="moderator" jid="${Romeo's full JID}" affiliation="owner"> + <actor xmlns="http://jabber.org/protocol/muc#user" nick="Romeo"/> + </item> + <status xmlns="http://jabber.org/protocol/muc#user" code="110"/> + </x> + </presence> + +Romeo receives: + <iq from="room@conference.localhost" id="reserve" type="result"/> + |