Changeset

10685:98f21a155737

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.
author Matthew Wild <mwild1@gmail.com>
date Thu, 12 Mar 2020 14:13:22 +0000
parents 10684:de607875d4bd
children 10686:ac3ec4f2b124
files plugins/muc/presence_broadcast.lib.lua
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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