mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 07:58:03 +01:00
Rename id to name in the configuration
This commit is contained in:
@@ -44,7 +44,7 @@ public class ConfiguredProfileBadgeConverter implements ProfileBadgeConverter {
|
||||
final ResourceBundleFactory resourceBundleFactory) {
|
||||
this.clock = clock;
|
||||
this.knownBadges = badgesConfiguration.getBadges().stream()
|
||||
.collect(Collectors.toMap(BadgeConfiguration::getName, Function.identity()));
|
||||
.collect(Collectors.toMap(BadgeConfiguration::getId, Function.identity()));
|
||||
this.resourceBundleFactory = resourceBundleFactory;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,20 +14,20 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class BadgeConfiguration {
|
||||
private final String name;
|
||||
private final String id;
|
||||
private final URL imageUrl;
|
||||
|
||||
@JsonCreator
|
||||
public BadgeConfiguration(
|
||||
@JsonProperty("name") final String name,
|
||||
@JsonProperty("id") final String id,
|
||||
@JsonProperty("imageUrl") @JsonDeserialize(converter = URLDeserializationConverter.class) final URL imageUrl) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
@NotEmpty
|
||||
public String getName() {
|
||||
return name;
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user