Skip to content

Commit

Permalink
fix: Suppress log when participant leaves. (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev authored Dec 16, 2024
1 parent 4b5cd13 commit 5803269
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ class ChatRoomMemberImpl(

var newRole: MemberRole = MemberRole.VISITOR
chatRoom.getOccupant(this)?.let { newRole = fromSmack(it.role, it.affiliation) }
if (!firstPresence && (role == MemberRole.VISITOR) != (newRole == MemberRole.VISITOR)) {
if (!firstPresence && presence.type != Presence.Type.unavailable &&
(role == MemberRole.VISITOR) != (newRole == MemberRole.VISITOR)
) {
// This will mess up various member counts
// TODO: Should we try to update them, instead?
logger.warn("Member role changed from $role to $newRole - not supported!")
Expand Down

0 comments on commit 5803269

Please sign in to comment.