mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 11:36:53 +00:00
serialize account current profile version as base64
This commit is contained in:
1 parent
90b280d6a0
commit
22656396dc
2 files changed
+28
-9
No files matched your search
@@ -93,7 +93,6 @@ public class Account {
|
||||
private IdentityKey phoneNumberIdentityKey;
|
||||
|
||||
@JsonProperty("cpv")
|
||||
@JsonSerialize(using = ProfileVersionAdapter.Serializing.class)
|
||||
@JsonDeserialize(using = ProfileVersionAdapter.Deserializing.class)
|
||||
private byte[] currentProfileVersion;
|
||||
|
||||
@@ -595,13 +594,5 @@ public class Account {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// after deploying this once we can get rid of it in favor of the default base64
|
||||
private static class Serializing extends JsonSerializer<byte[]> {
|
||||
@Override
|
||||
public void serialize(byte[] bytes, JsonGenerator jsonGenerator, SerializerProvider serializaterProvider) throws IOException {
|
||||
jsonGenerator.writeString(HexFormat.of().formatHex(bytes));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user