aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-31 14:34:35 +0000
committerMatthew Wild <mwild1@gmail.com>2018-10-31 14:34:35 +0000
commit5e8c49f27039dc8ec154c723c8fbfe7fdafd59ca (patch)
treeff8d81db3fbb073c3f8f60152ff6e1b372a1254b
parent9aa6e031d7d17067e34df8a7199f304bff0f4c86 (diff)
parent7d020141b2c811369985c012450856456c15ea58 (diff)
downloadprosody-5e8c49f27039dc8ec154c723c8fbfe7fdafd59ca.tar.gz
prosody-5e8c49f27039dc8ec154c723c8fbfe7fdafd59ca.zip
Merge 0.11->trunk
-rw-r--r--plugins/muc/util.lib.lua2
-rw-r--r--spec/scansion/issue1224.scs9
-rw-r--r--spec/scansion/muc_affiliation_notify.scs2
-rw-r--r--spec/scansion/muc_register.scs25
4 files changed, 35 insertions, 3 deletions
diff --git a/plugins/muc/util.lib.lua b/plugins/muc/util.lib.lua
index d03b4d6b..53a83fae 100644
--- a/plugins/muc/util.lib.lua
+++ b/plugins/muc/util.lib.lua
@@ -57,7 +57,7 @@ end
function _M.only_with_min_role(role)
local min_role_value = _M.valid_roles[role];
- return function (nick, occupant)
+ return function (nick, occupant) --luacheck: ignore 212/nick
if _M.valid_roles[occupant.role or "none"] >= min_role_value then
return true;
end
diff --git a/spec/scansion/issue1224.scs b/spec/scansion/issue1224.scs
index 40228182..b75cfbd1 100644
--- a/spec/scansion/issue1224.scs
+++ b/spec/scansion/issue1224.scs
@@ -1,4 +1,4 @@
-# MUC: Room registration and reserved nicknames
+# MUC: Handle affiliation changes from buggy clients
[Client] Romeo
jid: user@localhost
@@ -53,6 +53,13 @@ Romeo sends:
</iq>
Romeo receives:
+ <message from='room@conference.localhost'>
+ <x xmlns='http://jabber.org/protocol/muc#user'>
+ <item jid="${Juliet's JID}" affiliation='member' xmlns='http://jabber.org/protocol/muc#user'/>
+ </x>
+ </message>
+
+Romeo receives:
<iq from='room@conference.localhost' id='member1' type='result'/>
# Juliet connects, and joins the room
diff --git a/spec/scansion/muc_affiliation_notify.scs b/spec/scansion/muc_affiliation_notify.scs
index 3a62e0d2..e7d21fcd 100644
--- a/spec/scansion/muc_affiliation_notify.scs
+++ b/spec/scansion/muc_affiliation_notify.scs
@@ -131,7 +131,7 @@ Romeo sends:
<body>Finished!</body>
</message>
-Juliet receives:
+Juliet receives:
<message type="groupchat" from="room@conference.localhost/Romeo">
<body>Finished!</body>
</message>
diff --git a/spec/scansion/muc_register.scs b/spec/scansion/muc_register.scs
index 1cd8e36e..98af33f1 100644
--- a/spec/scansion/muc_register.scs
+++ b/spec/scansion/muc_register.scs
@@ -57,6 +57,13 @@ Romeo sends:
</iq>
Romeo receives:
+ <message from='room@conference.localhost'>
+ <x xmlns='http://jabber.org/protocol/muc#user'>
+ <item jid="${Juliet's JID}" affiliation='member' />
+ </x>
+ </message>
+
+Romeo receives:
<iq from='room@conference.localhost' id='member1' type='result'/>
# Juliet connects, and joins the room
@@ -186,6 +193,15 @@ Juliet sends:
Juliet receives:
<iq type='result' from='room@conference.localhost' id='unreg1'/>
+# Romeo is notified of Juliet's sad decision
+
+Romeo receives:
+ <message from='room@conference.localhost'>
+ <x xmlns='http://jabber.org/protocol/muc#user' scansion:strict='true'>
+ <item jid="${Juliet's JID}" />
+ </x>
+ </message>
+
# Rosaline attempts once more to sneak into the room, disguised as Juliet
Rosaline sends:
@@ -236,6 +252,15 @@ Romeo receives:
</x>
</presence>
+# An out-of-room affiliation change is received for Juliet
+
+Romeo receives:
+ <message from='room@conference.localhost'>
+ <x xmlns='http://jabber.org/protocol/muc#user'>
+ <item jid="${Juliet's JID}" affiliation='member' />
+ </x>
+ </message>
+
Romeo receives:
<iq type='result' id='member1' from='room@conference.localhost' />