Fix desktop sync with body-less messages.
This commit is contained in:
parent
222ba6ee53
commit
caf8bb39d8
2 changed files with 19 additions and 1 deletions
|
@ -159,7 +159,21 @@ public class SignalServiceDataMessage {
|
|||
|
||||
public boolean isGroupV2Update() {
|
||||
return isGroupV2Message() &&
|
||||
!body.isPresent();
|
||||
group.get().getGroupV2().get().hasSignedGroupChange() &&
|
||||
!hasRenderableContent();
|
||||
}
|
||||
|
||||
/** Contains some user data that affects the conversation */
|
||||
public boolean hasRenderableContent() {
|
||||
return attachments.isPresent() ||
|
||||
body.isPresent() ||
|
||||
quote.isPresent() ||
|
||||
contacts.isPresent() ||
|
||||
previews.isPresent() ||
|
||||
mentions.isPresent() ||
|
||||
sticker.isPresent() ||
|
||||
reaction.isPresent() ||
|
||||
remoteDelete.isPresent();
|
||||
}
|
||||
|
||||
public int getExpiresInSeconds() {
|
||||
|
|
|
@ -55,6 +55,10 @@ public final class SignalServiceGroupV2 {
|
|||
return signedGroupChange;
|
||||
}
|
||||
|
||||
public boolean hasSignedGroupChange() {
|
||||
return signedGroupChange != null && signedGroupChange.length > 0;
|
||||
}
|
||||
|
||||
public static Builder newBuilder(GroupMasterKey masterKey) {
|
||||
return new Builder(masterKey);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue