Room member moderation: kick, ban and unban (#2496)

* Room member moderation: kick, ban and unban

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa
2024-03-06 16:44:05 +01:00
committed by GitHub
parent 22715f4ea3
commit d8f9408cdb
113 changed files with 1410 additions and 83 deletions

View File

@@ -47,3 +47,9 @@ inline fun <R, T> Result<T>.flatMapCatching(transform: (T) -> Result<R>): Result
onFailure = { Result.failure(it) }
)
}
inline fun <T> Result<T>.finally(block: (exception: Throwable?) -> Unit): Result<T> {
onSuccess { block(null) }
onFailure(block)
return this
}