mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 05:07:41 +00:00
Remove receiver chains that are 5 old.
This commit is contained in:
@@ -230,8 +230,13 @@ public class SessionRecordV2 extends Record {
|
||||
.setSenderEphemeral(ByteString.copyFrom(senderEphemeral.serialize()))
|
||||
.build();
|
||||
|
||||
// XXX knock old chain out.
|
||||
this.sessionStructure = this.sessionStructure.toBuilder().addReceiverChains(chain).build();
|
||||
|
||||
if (this.sessionStructure.getReceiverChainsList().size() > 5) {
|
||||
this.sessionStructure = this.sessionStructure.toBuilder()
|
||||
.removeReceiverChains(0)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
public void setSenderChain(ECKeyPair senderEphemeralPair, ChainKey chainKey) {
|
||||
|
Reference in New Issue
Block a user