Sync mute status via storage service.

This commit is contained in:
Greyson Parrelli
2021-04-08 13:50:50 -04:00
parent 25ce2a649a
commit e096ba27ce
12 changed files with 158 additions and 31 deletions
@@ -104,6 +104,10 @@ public final class SignalContactRecord implements SignalRecord {
diff.add("ForcedUnread");
}
if (!Objects.equals(this.getMuteUntil(), that.getMuteUntil())) {
diff.add("MuteUntil");
}
if (!Objects.equals(this.hasUnknownFields(), that.hasUnknownFields())) {
diff.add("UnknownFields");
}
@@ -166,6 +170,10 @@ public final class SignalContactRecord implements SignalRecord {
return proto.getMarkedUnread();
}
public long getMuteUntil() {
return proto.getMutedUntilTimestamp();
}
ContactRecord toProto() {
return proto;
}
@@ -253,6 +261,11 @@ public final class SignalContactRecord implements SignalRecord {
return this;
}
public Builder setMuteUntil(long muteUntil) {
builder.setMutedUntilTimestamp(muteUntil);
return this;
}
public SignalContactRecord build() {
ContactRecord proto = builder.build();
@@ -60,6 +60,10 @@ public final class SignalGroupV1Record implements SignalRecord {
diff.add("ForcedUnread");
}
if (!Objects.equals(this.getMuteUntil(), that.getMuteUntil())) {
diff.add("MuteUntil");
}
if (!Objects.equals(this.hasUnknownFields(), that.hasUnknownFields())) {
diff.add("UnknownFields");
}
@@ -98,6 +102,10 @@ public final class SignalGroupV1Record implements SignalRecord {
return proto.getMarkedUnread();
}
public long getMuteUntil() {
return proto.getMutedUntilTimestamp();
}
GroupV1Record toProto() {
return proto;
}
@@ -154,6 +162,11 @@ public final class SignalGroupV1Record implements SignalRecord {
return this;
}
public Builder setMuteUntil(long muteUntil) {
builder.setMutedUntilTimestamp(muteUntil);
return this;
}
public SignalGroupV1Record build() {
GroupV1Record proto = builder.build();
@@ -62,6 +62,10 @@ public final class SignalGroupV2Record implements SignalRecord {
diff.add("ForcedUnread");
}
if (!Objects.equals(this.getMuteUntil(), that.getMuteUntil())) {
diff.add("MuteUntil");
}
if (!Objects.equals(this.hasUnknownFields(), that.hasUnknownFields())) {
diff.add("UnknownFields");
}
@@ -108,6 +112,11 @@ public final class SignalGroupV2Record implements SignalRecord {
return proto.getMarkedUnread();
}
public long getMuteUntil() {
return proto.getMutedUntilTimestamp();
}
GroupV2Record toProto() {
return proto;
}
@@ -168,6 +177,11 @@ public final class SignalGroupV2Record implements SignalRecord {
return this;
}
public Builder setMuteUntil(long muteUntil) {
builder.setMutedUntilTimestamp(muteUntil);
return this;
}
public SignalGroupV2Record build() {
GroupV2Record proto = builder.build();
@@ -69,34 +69,37 @@ message ContactRecord {
UNVERIFIED = 2;
}
string serviceUuid = 1;
string serviceE164 = 2;
bytes profileKey = 3;
bytes identityKey = 4;
IdentityState identityState = 5;
string givenName = 6;
string familyName = 7;
string username = 8;
bool blocked = 9;
bool whitelisted = 10;
bool archived = 11;
bool markedUnread = 12;
string serviceUuid = 1;
string serviceE164 = 2;
bytes profileKey = 3;
bytes identityKey = 4;
IdentityState identityState = 5;
string givenName = 6;
string familyName = 7;
string username = 8;
bool blocked = 9;
bool whitelisted = 10;
bool archived = 11;
bool markedUnread = 12;
uint64 mutedUntilTimestamp = 13;
}
message GroupV1Record {
bytes id = 1;
bool blocked = 2;
bool whitelisted = 3;
bool archived = 4;
bool markedUnread = 5;
bytes id = 1;
bool blocked = 2;
bool whitelisted = 3;
bool archived = 4;
bool markedUnread = 5;
uint64 mutedUntilTimestamp = 6;
}
message GroupV2Record {
bytes masterKey = 1;
bool blocked = 2;
bool whitelisted = 3;
bool archived = 4;
bool markedUnread = 5;
bytes masterKey = 1;
bool blocked = 2;
bool whitelisted = 3;
bool archived = 4;
bool markedUnread = 5;
uint64 mutedUntilTimestamp = 6;
}
message Payments {