diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-03-12 14:13:22 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-03-12 14:13:22 +0000 |
commit | 656fe85b7aeddd0650e627e16c1eccc275cb12f1 (patch) | |
tree | bb60064f4a01d0a8337cd694260243404840f9f5 /plugins/muc | |
parent | ed68050d3304f55cf5916ac228e28f8432968f3e (diff) | |
download | prosody-656fe85b7aeddd0650e627e16c1eccc275cb12f1.tar.gz prosody-656fe85b7aeddd0650e627e16c1eccc275cb12f1.zip |
MUC: Don't unconditionally broadcast presence with role="none"
Detailed explanation in de607875d4bd. A presence with role="none"
(which is always type="unavailable") should only be broadcast if
available presence was previously broadcast for that occupant.
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/presence_broadcast.lib.lua | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/plugins/muc/presence_broadcast.lib.lua b/plugins/muc/presence_broadcast.lib.lua index 613e6403..72e0d76b 100644 --- a/plugins/muc/presence_broadcast.lib.lua +++ b/plugins/muc/presence_broadcast.lib.lua @@ -11,7 +11,6 @@ local st = require "util.stanza"; local valid_roles = { "visitor", "participant", "moderator" }; local default_broadcast = { - none = true; visitor = true; participant = true; moderator = true; @@ -24,9 +23,6 @@ end local function set_presence_broadcast(room, broadcast_roles) broadcast_roles = broadcast_roles or default_broadcast; - -- Ensure that unavailable presence is always sent when role changes to none - broadcast_roles.none = true; - local changed = false; local old_broadcast_roles = get_presence_broadcast(room); for _, role in ipairs(valid_roles) do |