mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-15 18:59:12 +03:00
crypto: Get devices from the rust-sdk
This commit is contained in:
parent
5533c2acae
commit
9d5ef01ce0
1 changed files with 9 additions and 1 deletions
|
@ -395,7 +395,15 @@ internal class DefaultCryptoService @Inject constructor(
|
|||
*/
|
||||
override fun getDeviceInfo(userId: String, deviceId: String?): CryptoDeviceInfo? {
|
||||
return if (userId.isNotEmpty() && !deviceId.isNullOrEmpty()) {
|
||||
cryptoStore.getUserDevice(userId, deviceId)
|
||||
val device = runBlocking {
|
||||
olmMachine!!.getDevice(userId, deviceId)
|
||||
}
|
||||
|
||||
if (device != null) {
|
||||
device.toCryptoDeviceInfo()
|
||||
} else {
|
||||
null
|
||||
}
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue