From 2f51778421f66dee13b90ef939e62cfadad28de9 Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 14 Jan 2025 09:45:08 -0500 Subject: [PATCH] Use camel casing for entry position field on key transparency monitor requests --- .../controllers/KeyTransparencyController.java | 6 +++--- .../entities/KeyTransparencyMonitorRequest.java | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyController.java b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyController.java index 2f1ac344f..5dfb22ccc 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyController.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/KeyTransparencyController.java @@ -151,21 +151,21 @@ public KeyTransparencyMonitorResponse monitor( try { final AciMonitorRequest aciMonitorRequest = AciMonitorRequest.newBuilder() .setAci(ByteString.copyFrom(request.aci().value().toCompactByteArray())) - .setEntryPosition(request.aci().entry_position()) + .setEntryPosition(request.aci().entryPosition()) .setCommitmentIndex(ByteString.copyFrom(request.aci().commitmentIndex())) .build(); final Optional usernameHashMonitorRequest = request.usernameHash().map(usernameHash -> UsernameHashMonitorRequest.newBuilder() .setUsernameHash(ByteString.copyFrom(usernameHash.value())) - .setEntryPosition(usernameHash.entry_position()) + .setEntryPosition(usernameHash.entryPosition()) .setCommitmentIndex(ByteString.copyFrom(usernameHash.commitmentIndex())) .build()); final Optional e164MonitorRequest = request.e164().map(e164 -> E164MonitorRequest.newBuilder() .setE164(e164.value()) - .setEntryPosition(e164.entry_position()) + .setEntryPosition(e164.entryPosition()) .setCommitmentIndex(ByteString.copyFrom(e164.commitmentIndex())) .build()); diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/KeyTransparencyMonitorRequest.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/KeyTransparencyMonitorRequest.java index bc8771295..6df7fb611 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/KeyTransparencyMonitorRequest.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/KeyTransparencyMonitorRequest.java @@ -13,7 +13,6 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Positive; -import java.util.List; import java.util.Optional; import org.whispersystems.textsecuregcm.identity.AciServiceIdentifier; import org.whispersystems.textsecuregcm.util.ByteArrayAdapter; @@ -51,7 +50,7 @@ public record AciMonitor( @Schema(description = "A log tree position maintained by the client for the aci.") @Positive - long entry_position, + long entryPosition, @Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64") @JsonSerialize(using = ByteArrayAdapter.Serializing.class) @@ -68,7 +67,7 @@ public record E164Monitor( @Schema(description = "A log tree position maintained by the client for the e164.") @Positive - long entry_position, + long entryPosition, @Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64") @JsonSerialize(using = ByteArrayAdapter.Serializing.class) @@ -89,7 +88,7 @@ public record UsernameHashMonitor( @Schema(description = "A log tree position maintained by the client for the username hash.") @Positive - long entry_position, + long entryPosition, @Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64") @JsonSerialize(using = ByteArrayAdapter.Serializing.class)