Add gift configuration source
This commit is contained in:
parent
f21e9bcc4d
commit
f6471cf8f9
|
@ -29,6 +29,7 @@ import org.whispersystems.textsecuregcm.configuration.DynamoDbClientConfiguratio
|
||||||
import org.whispersystems.textsecuregcm.configuration.DynamoDbTables;
|
import org.whispersystems.textsecuregcm.configuration.DynamoDbTables;
|
||||||
import org.whispersystems.textsecuregcm.configuration.GcmConfiguration;
|
import org.whispersystems.textsecuregcm.configuration.GcmConfiguration;
|
||||||
import org.whispersystems.textsecuregcm.configuration.GcpAttachmentsConfiguration;
|
import org.whispersystems.textsecuregcm.configuration.GcpAttachmentsConfiguration;
|
||||||
|
import org.whispersystems.textsecuregcm.configuration.GiftConfiguration;
|
||||||
import org.whispersystems.textsecuregcm.configuration.MaxDeviceConfiguration;
|
import org.whispersystems.textsecuregcm.configuration.MaxDeviceConfiguration;
|
||||||
import org.whispersystems.textsecuregcm.configuration.MessageCacheConfiguration;
|
import org.whispersystems.textsecuregcm.configuration.MessageCacheConfiguration;
|
||||||
import org.whispersystems.textsecuregcm.configuration.PaymentsServiceConfiguration;
|
import org.whispersystems.textsecuregcm.configuration.PaymentsServiceConfiguration;
|
||||||
|
@ -242,6 +243,11 @@ public class WhisperServerConfiguration extends Configuration {
|
||||||
@NotNull
|
@NotNull
|
||||||
private BoostConfiguration boost;
|
private BoostConfiguration boost;
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
@JsonProperty
|
||||||
|
@NotNull
|
||||||
|
private GiftConfiguration gift;
|
||||||
|
|
||||||
@Valid
|
@Valid
|
||||||
@NotNull
|
@NotNull
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
|
@ -417,6 +423,10 @@ public class WhisperServerConfiguration extends Configuration {
|
||||||
return boost;
|
return boost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GiftConfiguration getGift() {
|
||||||
|
return gift;
|
||||||
|
}
|
||||||
|
|
||||||
public ReportMessageConfiguration getReportMessageConfiguration() {
|
public ReportMessageConfiguration getReportMessageConfiguration() {
|
||||||
return reportMessage;
|
return reportMessage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2022 Signal Messenger, LLC
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.whispersystems.textsecuregcm.configuration;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.DecimalMin;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
public record GiftConfiguration(
|
||||||
|
long level,
|
||||||
|
@NotNull Duration expiration,
|
||||||
|
@Valid @NotNull Map<@NotEmpty String, @DecimalMin("0.01") @NotNull BigDecimal> currencies,
|
||||||
|
@NotEmpty String badge) {
|
||||||
|
}
|
Loading…
Reference in New Issue