Add support for manual cancellation proto field.

This commit is contained in:
Alex Hart
2021-12-16 17:37:03 -04:00
committed by Greyson Parrelli
parent 5918227bff
commit 9177f5637a
6 changed files with 72 additions and 45 deletions
@@ -162,6 +162,10 @@ public final class SignalAccountRecord implements SignalRecord {
diff.add("DisplayBadgesOnProfile");
}
if (!Objects.equals(this.isSubscriptionManuallyCancelled(), that.isSubscriptionManuallyCancelled())) {
diff.add("SubscriptionManuallyCancelled");
}
return diff.toString();
} else {
return "Different class. " + getClass().getSimpleName() + " | " + other.getClass().getSimpleName();
@@ -260,6 +264,10 @@ public final class SignalAccountRecord implements SignalRecord {
return proto.getDisplayBadgesOnProfile();
}
public boolean isSubscriptionManuallyCancelled() {
return proto.getSubscriptionManuallyCancelled();
}
AccountRecord toProto() {
return proto;
}
@@ -588,6 +596,11 @@ public final class SignalAccountRecord implements SignalRecord {
return this;
}
public Builder setSubscriptionManuallyCancelled(boolean subscriptionManuallyCancelled) {
builder.setSubscriptionManuallyCancelled(subscriptionManuallyCancelled);
return this;
}
public SignalAccountRecord build() {
AccountRecord proto = builder.build();
@@ -128,27 +128,28 @@ message AccountRecord {
}
}
bytes profileKey = 1;
string givenName = 2;
string familyName = 3;
string avatarUrlPath = 4;
bool noteToSelfArchived = 5;
bool readReceipts = 6;
bool sealedSenderIndicators = 7;
bool typingIndicators = 8;
bool proxiedLinkPreviews = 9;
bool noteToSelfMarkedUnread = 10;
bool linkPreviews = 11;
PhoneNumberSharingMode phoneNumberSharingMode = 12;
bool unlistedPhoneNumber = 13;
repeated PinnedConversation pinnedConversations = 14;
bool preferContactAvatars = 15;
Payments payments = 16;
uint32 universalExpireTimer = 17;
bool primarySendsSms = 18;
string e164 = 19;
repeated string preferredReactionEmoji = 20;
bytes subscriberId = 21;
string subscriberCurrencyCode = 22;
bool displayBadgesOnProfile = 23;
bytes profileKey = 1;
string givenName = 2;
string familyName = 3;
string avatarUrlPath = 4;
bool noteToSelfArchived = 5;
bool readReceipts = 6;
bool sealedSenderIndicators = 7;
bool typingIndicators = 8;
bool proxiedLinkPreviews = 9;
bool noteToSelfMarkedUnread = 10;
bool linkPreviews = 11;
PhoneNumberSharingMode phoneNumberSharingMode = 12;
bool unlistedPhoneNumber = 13;
repeated PinnedConversation pinnedConversations = 14;
bool preferContactAvatars = 15;
Payments payments = 16;
uint32 universalExpireTimer = 17;
bool primarySendsSms = 18;
string e164 = 19;
repeated string preferredReactionEmoji = 20;
bytes subscriberId = 21;
string subscriberCurrencyCode = 22;
bool displayBadgesOnProfile = 23;
bool subscriptionManuallyCancelled = 24;
}