mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-29 12:28:36 +03:00
crypto: Only add our own devices if we're requesting devices for our own user
This commit is contained in:
parent
80e80e07b3
commit
d4090c4b0a
1 changed files with 5 additions and 2 deletions
|
@ -619,12 +619,15 @@ internal class OlmMachine(
|
|||
*/
|
||||
@Throws(CryptoStoreErrorException::class)
|
||||
suspend fun getUserDevices(userId: String): List<CryptoDeviceInfo> {
|
||||
val ownDevice = ownDevice()
|
||||
val devices = inner.getUserDevices(userId).map { toCryptoDeviceInfo(it) }.toMutableList()
|
||||
|
||||
// EA doesn't differentiate much between our own and other devices of
|
||||
// while the rust-sdk does, append our own device here.
|
||||
val ownDevice = this.ownDevice()
|
||||
|
||||
if (userId == ownDevice.userId) {
|
||||
devices.add(ownDevice)
|
||||
}
|
||||
|
||||
return devices
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue