Fix json deserialization in legacy stores

Fixes #1248
This commit is contained in:
AsamK 2023-05-18 11:08:57 +02:00
parent 6e61bc2000
commit 145a2f1179
3 changed files with 6 additions and 6 deletions

View file

@ -129,7 +129,7 @@ public class LegacyGroupStore {
public record Storage(@JsonDeserialize(using = GroupsDeserializer.class) List<Record> groups) { public record Storage(@JsonDeserialize(using = GroupsDeserializer.class) List<Record> groups) {
private record GroupV1( public record GroupV1(
String groupId, String groupId,
String expectedV2Id, String expectedV2Id,
String name, String name,
@ -140,9 +140,9 @@ public class LegacyGroupStore {
@JsonDeserialize(using = MembersDeserializer.class) List<Member> members @JsonDeserialize(using = MembersDeserializer.class) List<Member> members
) { ) {
private record Member(Long recipientId, String uuid, String number) {} public record Member(Long recipientId, String uuid, String number) {}
private record JsonRecipientAddress(String uuid, String number) {} public record JsonRecipientAddress(String uuid, String number) {}
private static class MembersDeserializer extends JsonDeserializer<List<Member>> { private static class MembersDeserializer extends JsonDeserializer<List<Member>> {
@ -168,7 +168,7 @@ public class LegacyGroupStore {
} }
} }
private record GroupV2( public record GroupV2(
String groupId, String groupId,
String masterKey, String masterKey,
String distributionId, String distributionId,

View file

@ -111,5 +111,5 @@ public class LegacyIdentityKeyStore {
} }
} }
private record IdentityStorage(String identityKey, int trustLevel, long addedTimestamp) {} public record IdentityStorage(String identityKey, int trustLevel, long addedTimestamp) {}
} }

View file

@ -28,7 +28,7 @@ public class LegacyStickerStore {
public record Storage(List<Sticker> stickers) { public record Storage(List<Sticker> stickers) {
private record Sticker(String packId, String packKey, boolean installed) { public record Sticker(String packId, String packKey, boolean installed) {
} }
} }