Document the nuances in UserId and SessionId types. (#1616)

This commit is contained in:
Marco Romano
2023-10-20 14:25:20 +02:00
committed by GitHub
parent ee60744530
commit 7e8f78c05d
2 changed files with 8 additions and 0 deletions

View File

@@ -16,4 +16,7 @@
package io.element.android.libraries.matrix.api.core
/**
* The [UserId] of the currently logged in user.
*/
typealias SessionId = UserId

View File

@@ -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 {