- if (syncMessage.getSent().isPresent()) {
- this.sentMessage = new JsonSyncDataMessage(syncMessage.getSent().get());
- }
- if (syncMessage.getBlockedList().isPresent()) {
- this.blockedNumbers = syncMessage.getBlockedList().get().getNumbers();
- }
- if (syncMessage.getRead().isPresent()) {
- this.readMessages = syncMessage.getRead().get();
- }
+ if (syncMessage.getSent().isPresent()) {
+ this.sentMessage = new JsonSyncDataMessage(syncMessage.getSent().get());
+ }
+ if (syncMessage.getBlockedList().isPresent()) {
+ this.blockedNumbers = new ArrayList<>(syncMessage.getBlockedList().get().getAddresses().size());
+ for (SignalServiceAddress address : syncMessage.getBlockedList().get().getAddresses()) {
+ this.blockedNumbers.add(address.getNumber().get());
+ }
+ }
+ if (syncMessage.getRead().isPresent()) {
+ this.readMessages = syncMessage.getRead().get();
+ }