mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Clear sender key shared state on archive and prekey message receive.
We need to clear the sender key shared state whenever a registrationId changes. We don't have good hooks for that on Android, so instead we're just going to reset on every archive and prekey receive. It's a little overzealous, but given these are rare events anyway, it shouldn't be a big deal.
This commit is contained in:
@@ -19,6 +19,7 @@ import org.whispersystems.signalservice.api.SignalServiceAccountDataStore;
|
||||
import org.whispersystems.signalservice.api.push.DistributionId;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -139,6 +140,7 @@ public class SignalServiceAccountDataStoreImpl implements SignalServiceAccountDa
|
||||
@Override
|
||||
public void archiveSession(SignalProtocolAddress address) {
|
||||
sessionStore.archiveSession(address);
|
||||
senderKeyStore.clearSenderKeySharedWith(Collections.singleton(address));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user