Skip to content

Commit

Permalink
fix: Suppress log when participant leaves.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev committed Dec 11, 2024
1 parent 818ab43 commit dc49421
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 dc49421

Please sign in to comment.