mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Update libsignal-service
This commit is contained in:
parent
a7a5947a1b
commit
ed746c389c
4 changed files with 12 additions and 17 deletions
|
@ -22,7 +22,6 @@ public enum TrustLevel {
|
|||
case DEFAULT -> TRUSTED_UNVERIFIED;
|
||||
case UNVERIFIED -> UNTRUSTED;
|
||||
case VERIFIED -> TRUSTED_VERIFIED;
|
||||
case UNRECOGNIZED -> null;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import org.whispersystems.signalservice.api.storage.SignalAccountRecord;
|
|||
import org.whispersystems.signalservice.api.storage.SignalStorageManifest;
|
||||
import org.whispersystems.signalservice.api.storage.SignalStorageRecord;
|
||||
import org.whispersystems.signalservice.api.storage.StorageId;
|
||||
import org.whispersystems.signalservice.internal.storage.protos.AccountRecord;
|
||||
import org.whispersystems.signalservice.internal.storage.protos.ManifestRecord;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -80,13 +79,13 @@ public class StorageHelper {
|
|||
logger.trace("Reading {} new records", manifest.get().getStorageIds().size());
|
||||
for (final var record : getSignalStorageRecords(storageIds)) {
|
||||
logger.debug("Reading record of type {}", record.getType());
|
||||
if (record.getType() == ManifestRecord.Identifier.Type.ACCOUNT_VALUE) {
|
||||
if (record.getType() == ManifestRecord.Identifier.Type.ACCOUNT.getValue()) {
|
||||
readAccountRecord(record);
|
||||
} else if (record.getType() == ManifestRecord.Identifier.Type.GROUPV2_VALUE) {
|
||||
} else if (record.getType() == ManifestRecord.Identifier.Type.GROUPV2.getValue()) {
|
||||
readGroupV2Record(record);
|
||||
} else if (record.getType() == ManifestRecord.Identifier.Type.GROUPV1_VALUE) {
|
||||
} else if (record.getType() == ManifestRecord.Identifier.Type.GROUPV1.getValue()) {
|
||||
readGroupV1Record(record);
|
||||
} else if (record.getType() == ManifestRecord.Identifier.Type.CONTACT_VALUE) {
|
||||
} else if (record.getType() == ManifestRecord.Identifier.Type.CONTACT.getValue()) {
|
||||
readContactRecord(record);
|
||||
}
|
||||
}
|
||||
|
@ -256,14 +255,11 @@ public class StorageHelper {
|
|||
account.getConfigurationStore()
|
||||
.setUnidentifiedDeliveryIndicators(accountRecord.isSealedSenderIndicatorsEnabled());
|
||||
account.getConfigurationStore().setLinkPreviews(accountRecord.isLinkPreviewsEnabled());
|
||||
if (accountRecord.getPhoneNumberSharingMode() != AccountRecord.PhoneNumberSharingMode.UNRECOGNIZED) {
|
||||
account.getConfigurationStore()
|
||||
.setPhoneNumberSharingMode(switch (accountRecord.getPhoneNumberSharingMode()) {
|
||||
case EVERYBODY -> PhoneNumberSharingMode.EVERYBODY;
|
||||
case NOBODY -> PhoneNumberSharingMode.NOBODY;
|
||||
default -> PhoneNumberSharingMode.CONTACTS;
|
||||
});
|
||||
}
|
||||
account.getConfigurationStore().setPhoneNumberSharingMode(switch (accountRecord.getPhoneNumberSharingMode()) {
|
||||
case EVERYBODY -> PhoneNumberSharingMode.EVERYBODY;
|
||||
case NOBODY -> PhoneNumberSharingMode.NOBODY;
|
||||
case CONTACTS_ONLY -> PhoneNumberSharingMode.CONTACTS;
|
||||
});
|
||||
account.getConfigurationStore().setPhoneNumberUnlisted(accountRecord.isPhoneNumberUnlisted());
|
||||
account.setUsername(accountRecord.getUsername());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue