Document the nuances in UserId and SessionId types. (#1616)
This commit is contained in:
@@ -16,4 +16,7 @@
|
||||
|
||||
package io.element.android.libraries.matrix.api.core
|
||||
|
||||
/**
|
||||
* The [UserId] of the currently logged in user.
|
||||
*/
|
||||
typealias SessionId = UserId
|
||||
|
||||
@@ -19,6 +19,11 @@ package io.element.android.libraries.matrix.api.core
|
||||
import io.element.android.libraries.matrix.api.BuildConfig
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* A [String] holding a valid Matrix user ID.
|
||||
*
|
||||
* https://spec.matrix.org/v1.8/appendices/#user-identifiers
|
||||
*/
|
||||
@JvmInline
|
||||
value class UserId(val value: String) : Serializable {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user