# HG changeset patch # User Matthew Wild # Date 1584022402 0 # Node ID 98f21a1557377dbc14ec0f590f2c44e9abf9b8be # Parent de607875d4bd4ae019cbb979235eb8c0ceeca2ce 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. diff -r de607875d4bd -r 98f21a155737 plugins/muc/presence_broadcast.lib.lua --- a/plugins/muc/presence_broadcast.lib.lua Thu Mar 12 14:10:12 2020 +0000 +++ b/plugins/muc/presence_broadcast.lib.lua Thu Mar 12 14:13:22 2020 +0000 @@ -11,7 +11,6 @@ local valid_roles = { "visitor", "participant", "moderator" }; local default_broadcast = { - none = true; visitor = true; participant = true; moderator = true; @@ -24,9 +23,6 @@ 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