From 9b50584ff5c6fe0fba5279476bc4e306d607dbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Mon, 12 Jul 2021 11:43:26 +0300 Subject: [PATCH] fix: Fixes jitsi/jitsi-meet#9502 reload of authenticated users. --- .../org/jitsi/jicofo/xmpp/muc/ChatRoomRoleManager.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/kotlin/org/jitsi/jicofo/xmpp/muc/ChatRoomRoleManager.kt b/src/main/kotlin/org/jitsi/jicofo/xmpp/muc/ChatRoomRoleManager.kt index 29af8438fe..f067c71682 100644 --- a/src/main/kotlin/org/jitsi/jicofo/xmpp/muc/ChatRoomRoleManager.kt +++ b/src/main/kotlin/org/jitsi/jicofo/xmpp/muc/ChatRoomRoleManager.kt @@ -134,5 +134,14 @@ class AuthenticationRoleManager( grantOwnerToAuthenticatedUsers() } + /** + * Handles cases where moderators(already authenticated users) reload and join again. + */ + override fun memberJoined(member: ChatRoomMember) { + if (member.role != MemberRole.OWNER && authenticationAuthority.getSessionForJid(member.jid) != null) { + grantOwner(member) + } + } + override fun stop() = authenticationAuthority.removeAuthenticationListener(authenticationListener) }