aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-03-12 14:13:22 +0000
committerMatthew Wild <mwild1@gmail.com>2020-03-12 14:13:22 +0000
commit0cb40c7b0516d2371428113ae99961cb6368291f (patch)
treebb60064f4a01d0a8337cd694260243404840f9f5 /plugins/muc
parente30cbeae993803583e1f2ed2085c9be5b5fb6f63 (diff)
downloadprosody-0cb40c7b0516d2371428113ae99961cb6368291f.tar.gz
prosody-0cb40c7b0516d2371428113ae99961cb6368291f.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.lua4
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