Add Change Number capability and Conversation Update item.

This commit is contained in:
Cody Henthorne
2021-09-08 13:38:39 -04:00
committed by Greyson Parrelli
parent bb446ac1d5
commit 77ff25ec49
31 changed files with 307 additions and 34 deletions

View File

@@ -9,8 +9,6 @@ package org.whispersystems.signalservice.api.account;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.whispersystems.signalservice.api.profiles.SignalServiceProfile;
public class AccountAttributes {
@JsonProperty
@@ -134,16 +132,20 @@ public class AccountAttributes {
@JsonProperty
private boolean announcementGroup;
@JsonProperty
private boolean changeNumber;
@JsonCreator
public Capabilities() {}
public Capabilities(boolean uuid, boolean gv2, boolean storage, boolean gv1Migration, boolean senderKey, boolean announcementGroup) {
public Capabilities(boolean uuid, boolean gv2, boolean storage, boolean gv1Migration, boolean senderKey, boolean announcementGroup, boolean changeNumber) {
this.uuid = uuid;
this.gv2 = gv2;
this.storage = storage;
this.gv1Migration = gv1Migration;
this.senderKey = senderKey;
this.announcementGroup = announcementGroup;
this.changeNumber = changeNumber;
}
public boolean isUuid() {
@@ -169,5 +171,9 @@ public class AccountAttributes {
public boolean isAnnouncementGroup() {
return announcementGroup;
}
public boolean isChangeNumber() {
return changeNumber;
}
}
}

View File

@@ -127,6 +127,9 @@ public class SignalServiceProfile {
@JsonProperty
private boolean announcementGroup;
@JsonProperty
private boolean changeNumber;
@JsonCreator
public Capabilities() {}
@@ -149,6 +152,10 @@ public class SignalServiceProfile {
public boolean isAnnouncementGroup() {
return announcementGroup;
}
public boolean isChangeNumber() {
return changeNumber;
}
}
public ProfileKeyCredentialResponse getProfileKeyCredentialResponse() {