mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01:00
Fix linked device inactive filtering.
This commit is contained in:
committed by
Alex Hart
parent
98290a9fa3
commit
3beac6dfa9
@@ -76,8 +76,8 @@ class LinkedDeviceInactiveCheckJob private constructor(
|
|||||||
val leastActiveDevice: LeastActiveLinkedDevice? = devices
|
val leastActiveDevice: LeastActiveLinkedDevice? = devices
|
||||||
.filter { it.id != SignalServiceAddress.DEFAULT_DEVICE_ID }
|
.filter { it.id != SignalServiceAddress.DEFAULT_DEVICE_ID }
|
||||||
.filter { it.name != null }
|
.filter { it.name != null }
|
||||||
.minBy { it.lastSeen }
|
.minByOrNull { it.lastSeen }
|
||||||
.let {
|
?.let {
|
||||||
val nameProto = DeviceName.ADAPTER.decode(Base64.decode(it.getName()))
|
val nameProto = DeviceName.ADAPTER.decode(Base64.decode(it.getName()))
|
||||||
val decryptedBytes = DeviceNameCipher.decryptDeviceName(nameProto, AppDependencies.protocolStore.aci().identityKeyPair) ?: return@let null
|
val decryptedBytes = DeviceNameCipher.decryptDeviceName(nameProto, AppDependencies.protocolStore.aci().identityKeyPair) ?: return@let null
|
||||||
val name = String(decryptedBytes)
|
val name = String(decryptedBytes)
|
||||||
|
|||||||
Reference in New Issue
Block a user