fix (left room membership) : use correct membership change and add test

This commit is contained in:
ganfra 2025-05-22 21:41:44 +02:00
parent b016f2e0ac
commit 2b87281704
4 changed files with 120 additions and 14 deletions

View file

@ -137,10 +137,11 @@ class RustBaseRoom(
}
override suspend fun leave(): Result<Unit> = withContext(roomDispatcher) {
val membershipBeforeLeft = roomInfoFlow.value.currentUserMembership
runCatching {
innerRoom.leave()
}.onSuccess {
roomMembershipObserver.notifyUserLeftRoom(roomId)
roomMembershipObserver.notifyUserLeftRoom(roomId, membershipBeforeLeft)
}
}