mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Initial pre-alpha support for sender key.
This commit is contained in:
@@ -104,6 +104,7 @@ public class Recipient {
|
||||
private final boolean forceSmsSelection;
|
||||
private final Capability groupsV2Capability;
|
||||
private final Capability groupsV1MigrationCapability;
|
||||
private final Capability senderKeyCapability;
|
||||
private final InsightsBannerTier insightsBannerTier;
|
||||
private final byte[] storageId;
|
||||
private final MentionSetting mentionSetting;
|
||||
@@ -352,6 +353,7 @@ public class Recipient {
|
||||
this.forceSmsSelection = false;
|
||||
this.groupsV2Capability = Capability.UNKNOWN;
|
||||
this.groupsV1MigrationCapability = Capability.UNKNOWN;
|
||||
this.senderKeyCapability = Capability.UNKNOWN;
|
||||
this.storageId = null;
|
||||
this.mentionSetting = MentionSetting.ALWAYS_NOTIFY;
|
||||
this.wallpaper = null;
|
||||
@@ -402,6 +404,7 @@ public class Recipient {
|
||||
this.forceSmsSelection = details.forceSmsSelection;
|
||||
this.groupsV2Capability = details.groupsV2Capability;
|
||||
this.groupsV1MigrationCapability = details.groupsV1MigrationCapability;
|
||||
this.senderKeyCapability = details.senderKeyCapability;
|
||||
this.storageId = details.storageId;
|
||||
this.mentionSetting = details.mentionSetting;
|
||||
this.wallpaper = details.wallpaper;
|
||||
@@ -867,6 +870,17 @@ public class Recipient {
|
||||
return groupsV1MigrationCapability;
|
||||
}
|
||||
|
||||
public @NonNull Capability getSenderKeyCapability() {
|
||||
return senderKeyCapability;
|
||||
}
|
||||
|
||||
/**
|
||||
* True if this recipient supports the message retry system, or false if we should use the legacy session reset system.
|
||||
*/
|
||||
public boolean supportsMessageRetries() {
|
||||
return getSenderKeyCapability() == Capability.SUPPORTED;
|
||||
}
|
||||
|
||||
public @Nullable byte[] getProfileKey() {
|
||||
return profileKey;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ public class RecipientDetails {
|
||||
final boolean forceSmsSelection;
|
||||
final Recipient.Capability groupsV2Capability;
|
||||
final Recipient.Capability groupsV1MigrationCapability;
|
||||
final Recipient.Capability senderKeyCapability;
|
||||
final InsightsBannerTier insightsBannerTier;
|
||||
final byte[] storageId;
|
||||
final MentionSetting mentionSetting;
|
||||
@@ -117,6 +118,7 @@ public class RecipientDetails {
|
||||
this.forceSmsSelection = settings.isForceSmsSelection();
|
||||
this.groupsV2Capability = settings.getGroupsV2Capability();
|
||||
this.groupsV1MigrationCapability = settings.getGroupsV1MigrationCapability();
|
||||
this.senderKeyCapability = settings.getSenderKeyCapability();
|
||||
this.insightsBannerTier = settings.getInsightsBannerTier();
|
||||
this.storageId = settings.getStorageId();
|
||||
this.mentionSetting = settings.getMentionSetting();
|
||||
@@ -171,6 +173,7 @@ public class RecipientDetails {
|
||||
this.groupName = null;
|
||||
this.groupsV2Capability = Recipient.Capability.UNKNOWN;
|
||||
this.groupsV1MigrationCapability = Recipient.Capability.UNKNOWN;
|
||||
this.senderKeyCapability = Recipient.Capability.UNKNOWN;
|
||||
this.storageId = null;
|
||||
this.mentionSetting = MentionSetting.ALWAYS_NOTIFY;
|
||||
this.wallpaper = null;
|
||||
|
||||
Reference in New Issue
Block a user