fix (left room membership) : use correct membership change and add test
This commit is contained in:
parent
b016f2e0ac
commit
2b87281704
4 changed files with 120 additions and 14 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue