kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix desktop sync with body-less messages.
rodzic
222ba6ee53
commit
caf8bb39d8
|
@ -159,7 +159,21 @@ public class SignalServiceDataMessage {
|
||||||
|
|
||||||
public boolean isGroupV2Update() {
|
public boolean isGroupV2Update() {
|
||||||
return isGroupV2Message() &&
|
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() {
|
public int getExpiresInSeconds() {
|
||||||
|
|
|
@ -55,6 +55,10 @@ public final class SignalServiceGroupV2 {
|
||||||
return signedGroupChange;
|
return signedGroupChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasSignedGroupChange() {
|
||||||
|
return signedGroupChange != null && signedGroupChange.length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
public static Builder newBuilder(GroupMasterKey masterKey) {
|
public static Builder newBuilder(GroupMasterKey masterKey) {
|
||||||
return new Builder(masterKey);
|
return new Builder(masterKey);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue