handle new RegistrationService proto error

This commit is contained in:
Ravi Khadiwala
2023-12-19 13:37:04 -06:00
committed by ravi-signal
parent 9d3d4a3698
commit ca47a7b663
8 changed files with 102 additions and 6 deletions

View File

@@ -59,6 +59,11 @@ public class DynamicConfiguration {
@Valid
DynamicInboundMessageByteLimitConfiguration inboundMessageByteLimit = new DynamicInboundMessageByteLimitConfiguration(true);
@JsonProperty
@Valid
DynamicRegistrationConfiguration registrationConfiguration = new DynamicRegistrationConfiguration(false);
public Optional<DynamicExperimentEnrollmentConfiguration> getExperimentEnrollmentConfiguration(
final String experimentName) {
return Optional.ofNullable(experiments.get(experimentName));
@@ -104,4 +109,8 @@ public class DynamicConfiguration {
public DynamicInboundMessageByteLimitConfiguration getInboundMessageByteLimitConfiguration() {
return inboundMessageByteLimit;
}
public DynamicRegistrationConfiguration getRegistrationConfiguration() {
return registrationConfiguration;
}
}

View File

@@ -0,0 +1,7 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.configuration.dynamic;
public record DynamicRegistrationConfiguration(boolean squashDeclinedAttemptErrors) {}