mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 13:56:53 +00:00
Align KeyTransparencySearchResponse with distinguished counterpart and update DistinguishedResponse field names
This commit is contained in:
1 parent
f3b22e04e8
commit
d335b7a033
5 files changed
+8
-32
No files matched your search
+1
-4
@@ -123,10 +123,7 @@ public class KeyTransparencyController {
|
||||
KEY_TRANSPARENCY_RPC_TIMEOUT)
|
||||
.thenApply(searchResponse ->
|
||||
new KeyTransparencySearchResponse(
|
||||
searchResponse.getTreeHead().toByteArray(),
|
||||
searchResponse.getAci().toByteArray(),
|
||||
searchResponse.hasE164() ? Optional.of(searchResponse.getE164().toByteArray()) : Optional.empty(),
|
||||
searchResponse.hasUsernameHash() ? Optional.of(searchResponse.getUsernameHash().toByteArray()) : Optional.empty())
|
||||
searchResponse.toByteArray())
|
||||
).join();
|
||||
} catch (final CancellationException exception) {
|
||||
LOGGER.error("Unexpected cancellation from key transparency service", exception);
|
||||
|
||||
+1
-1
@@ -15,6 +15,6 @@ public record KeyTransparencyDistinguishedKeyResponse(
|
||||
@NotNull
|
||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@Schema(description = "The response for the distinguished tree head encoded in standard un-padded base64")
|
||||
@Schema(description = "The serialized `DistinguishedResponse` encoded in standard un-padded base64")
|
||||
byte[] distinguishedKeyResponse
|
||||
) {}
|
||||
+2
-18
@@ -17,22 +17,6 @@ public record KeyTransparencySearchResponse(
|
||||
@NotNull
|
||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@Schema(description = "The `FullTreeHead` protobuf encoded in standard un-padded base64. This should be used across all identifiers.")
|
||||
byte[] fullTreeHead,
|
||||
|
||||
@NotNull
|
||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
|
||||
@Schema(description = "The `TreeSearchResponse` protobuf for the ACI identifier encoded in standard un-padded base64")
|
||||
byte[] aciSearchResponse,
|
||||
|
||||
@JsonSerialize(contentUsing = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(contentUsing = ByteArrayAdapter.Deserializing.class)
|
||||
@Schema(description = "The `TreeSearchResponse` protobuf for the E164 encoded in standard un-padded base64")
|
||||
Optional<byte[]> e164SearchResponse,
|
||||
|
||||
@JsonSerialize(contentUsing = ByteArrayAdapter.Serializing.class)
|
||||
@JsonDeserialize(contentUsing = ByteArrayAdapter.Deserializing.class)
|
||||
@Schema(description = "The `TreeSearchResponse` protobuf for the username hash encoded in standard un-padded base64")
|
||||
Optional<byte[]> usernameHashSearchResponse
|
||||
@Schema(description = "The serialized `SearchResponse` encoded in standard un-padded base64.")
|
||||
byte[] serializedResponse
|
||||
) {}
|
||||
Reference in new issue
Block a user