Remove deprecated blocked field from DeviceContact.
This commit is contained in:
parent
0544c1f249
commit
aeae6ac292
8 changed files with 2 additions and 20 deletions
|
@ -122,8 +122,6 @@ class MultiDeviceContactSyncJob(parameters: Parameters, private val attachmentPo
|
|||
}
|
||||
}
|
||||
|
||||
recipients.setBlocked(recipient.id, contact.isBlocked)
|
||||
|
||||
val threadRecord = threads.getThreadRecord(threads.getThreadIdFor(recipient.id))
|
||||
if (threadRecord != null && contact.isArchived != threadRecord.isArchived) {
|
||||
if (contact.isArchived) {
|
||||
|
|
|
@ -168,7 +168,6 @@ public class MultiDeviceContactUpdateJob extends BaseJob {
|
|||
Optional.of(ChatColorsMapper.getMaterialColor(recipient.getChatColors()).serialize()),
|
||||
verifiedMessage,
|
||||
ProfileKeyUtil.profileKeyOptional(recipient.getProfileKey()),
|
||||
recipient.isBlocked(),
|
||||
recipient.getExpiresInSeconds() > 0 ? Optional.of(recipient.getExpiresInSeconds())
|
||||
: Optional.empty(),
|
||||
Optional.ofNullable(inboxPositions.get(recipientId)),
|
||||
|
@ -235,7 +234,6 @@ public class MultiDeviceContactUpdateJob extends BaseJob {
|
|||
Optional.of(ChatColorsMapper.getMaterialColor(recipient.getChatColors()).serialize()),
|
||||
verified,
|
||||
profileKey,
|
||||
blocked,
|
||||
expireTimer,
|
||||
inboxPosition,
|
||||
archived.contains(recipient.getId())));
|
||||
|
@ -253,7 +251,6 @@ public class MultiDeviceContactUpdateJob extends BaseJob {
|
|||
Optional.of(ChatColorsMapper.getMaterialColor(self.getChatColors()).serialize()),
|
||||
Optional.empty(),
|
||||
ProfileKeyUtil.profileKeyOptionalOrThrow(self.getProfileKey()),
|
||||
false,
|
||||
self.getExpiresInSeconds() > 0 ? Optional.of(self.getExpiresInSeconds()) : Optional.empty(),
|
||||
Optional.ofNullable(inboxPositions.get(self.getId())),
|
||||
archived.contains(self.getId())));
|
||||
|
|
|
@ -84,7 +84,6 @@ public class MultiDeviceProfileKeyUpdateJob extends BaseJob {
|
|||
Optional.empty(),
|
||||
Optional.empty(),
|
||||
profileKey,
|
||||
false,
|
||||
Optional.empty(),
|
||||
Optional.empty(),
|
||||
false));
|
||||
|
|
|
@ -23,7 +23,6 @@ public class DeviceContact {
|
|||
private final Optional<String> color;
|
||||
private final Optional<VerifiedMessage> verified;
|
||||
private final Optional<ProfileKey> profileKey;
|
||||
private final boolean blocked;
|
||||
private final Optional<Integer> expirationTimer;
|
||||
private final Optional<Integer> inboxPosition;
|
||||
private final boolean archived;
|
||||
|
@ -35,7 +34,6 @@ public class DeviceContact {
|
|||
Optional<String> color,
|
||||
Optional<VerifiedMessage> verified,
|
||||
Optional<ProfileKey> profileKey,
|
||||
boolean blocked,
|
||||
Optional<Integer> expirationTimer,
|
||||
Optional<Integer> inboxPosition,
|
||||
boolean archived)
|
||||
|
@ -51,7 +49,6 @@ public class DeviceContact {
|
|||
this.color = color;
|
||||
this.verified = verified;
|
||||
this.profileKey = profileKey;
|
||||
this.blocked = blocked;
|
||||
this.expirationTimer = expirationTimer;
|
||||
this.inboxPosition = inboxPosition;
|
||||
this.archived = archived;
|
||||
|
@ -85,10 +82,6 @@ public class DeviceContact {
|
|||
return profileKey;
|
||||
}
|
||||
|
||||
public boolean isBlocked() {
|
||||
return blocked;
|
||||
}
|
||||
|
||||
public Optional<Integer> getExpirationTimer() {
|
||||
return expirationTimer;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@ public class DeviceContactsInputStream extends ChunkedInputStream {
|
|||
Optional<String> color = details.color != null ? Optional.of(details.color) : Optional.empty();
|
||||
Optional<VerifiedMessage> verified = Optional.empty();
|
||||
Optional<ProfileKey> profileKey = Optional.empty();
|
||||
boolean blocked = false;
|
||||
Optional<Integer> expireTimer = Optional.empty();
|
||||
Optional<Integer> inboxPosition = Optional.empty();
|
||||
boolean archived = false;
|
||||
|
@ -107,10 +106,9 @@ public class DeviceContactsInputStream extends ChunkedInputStream {
|
|||
inboxPosition = Optional.of(details.inboxPosition);
|
||||
}
|
||||
|
||||
blocked = details.blocked;
|
||||
archived = details.archived;
|
||||
|
||||
return new DeviceContact(aci, e164, name, avatar, color, verified, profileKey, blocked, expireTimer, inboxPosition, archived);
|
||||
return new DeviceContact(aci, e164, name, avatar, color, verified, profileKey, expireTimer, inboxPosition, archived);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -93,7 +93,6 @@ public class DeviceContactsOutputStream extends ChunkedOutputStream {
|
|||
contactDetails.inboxPosition(contact.getInboxPosition().get());
|
||||
}
|
||||
|
||||
contactDetails.blocked(contact.isBlocked());
|
||||
contactDetails.archived(contact.isArchived());
|
||||
|
||||
byte[] serializedContactDetails = contactDetails.build().encode();
|
||||
|
|
|
@ -741,7 +741,7 @@ message ContactDetails {
|
|||
optional string color = 4;
|
||||
optional Verified verified = 5;
|
||||
optional bytes profileKey = 6;
|
||||
optional bool blocked = 7;
|
||||
reserved /*blocked*/ 7;
|
||||
optional uint32 expireTimer = 8;
|
||||
optional uint32 inboxPosition = 10;
|
||||
optional bool archived = 11;
|
||||
|
|
|
@ -38,7 +38,6 @@ public class DeviceContactsInputStreamTest {
|
|||
Optional.of("ultramarine"),
|
||||
Optional.of(new VerifiedMessage(new SignalServiceAddress(aciFirst.get(), e164First), generateIdentityKey(), VerifiedMessage.VerifiedState.DEFAULT, System.currentTimeMillis())),
|
||||
Optional.of(generateProfileKey()),
|
||||
false,
|
||||
Optional.of(0),
|
||||
Optional.of(0),
|
||||
false
|
||||
|
@ -52,7 +51,6 @@ public class DeviceContactsInputStreamTest {
|
|||
Optional.of("ultramarine"),
|
||||
Optional.of(new VerifiedMessage(new SignalServiceAddress(aciSecond.get(), e164Second), generateIdentityKey(), VerifiedMessage.VerifiedState.DEFAULT, System.currentTimeMillis())),
|
||||
Optional.of(generateProfileKey()),
|
||||
false,
|
||||
Optional.of(0),
|
||||
Optional.of(0),
|
||||
false
|
||||
|
|
Loading…
Add table
Reference in a new issue