Support syncing dontNotifyIfMuted on GV2Records.

This commit is contained in:
Greyson Parrelli
2022-02-09 10:03:31 -05:00
committed by GitHub
parent b91a2e1450
commit 80a2e1e3cc
5 changed files with 39 additions and 17 deletions

View File

@@ -74,6 +74,10 @@ public final class SignalGroupV2Record implements SignalRecord {
diff.add("MuteUntil");
}
if (!Objects.equals(this.notifyForMentionsWhenMuted(), that.notifyForMentionsWhenMuted())) {
diff.add("NotifyForMentionsWhenMuted");
}
if (!Objects.equals(this.hasUnknownFields(), that.hasUnknownFields())) {
diff.add("UnknownFields");
}
@@ -124,6 +128,10 @@ public final class SignalGroupV2Record implements SignalRecord {
return proto.getMutedUntilTimestamp();
}
public boolean notifyForMentionsWhenMuted() {
return !proto.getDontNotifyForMentionsIfMuted();
}
GroupV2Record toProto() {
return proto;
@@ -188,6 +196,11 @@ public final class SignalGroupV2Record implements SignalRecord {
return this;
}
public Builder setNotifyForMentionsWhenMuted(boolean value) {
builder.setDontNotifyForMentionsIfMuted(!value);
return this;
}
private static GroupV2Record.Builder parseUnknowns(byte[] serializedUnknowns) {
try {
return GroupV2Record.parseFrom(serializedUnknowns).toBuilder();

View File

@@ -94,12 +94,13 @@ message GroupV1Record {
}
message GroupV2Record {
bytes masterKey = 1;
bool blocked = 2;
bool whitelisted = 3;
bool archived = 4;
bool markedUnread = 5;
uint64 mutedUntilTimestamp = 6;
bytes masterKey = 1;
bool blocked = 2;
bool whitelisted = 3;
bool archived = 4;
bool markedUnread = 5;
uint64 mutedUntilTimestamp = 6;
bool dontNotifyForMentionsIfMuted = 7;
}
message Payments {