mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-29 09:28:29 +00:00
Fix desktop sync with body-less messages.
This commit is contained in:
parent
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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user