mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-22 23:24:19 +01:00
Update to libsignal 2.15.3_unofficial_2
This commit is contained in:
@@ -265,7 +265,7 @@ public class Manager implements Signal {
|
||||
}
|
||||
|
||||
public void updateAccountAttributes() throws IOException {
|
||||
accountManager.setAccountAttributes(account.getSignalingKey(), account.getSignalProtocolStore().getLocalRegistrationId(), true, account.getRegistrationLockPin(), getSelfUnidentifiedAccessKey(), false);
|
||||
accountManager.setAccountAttributes(account.getSignalingKey(), account.getSignalProtocolStore().getLocalRegistrationId(), true, account.getRegistrationLockPin(), account.getRegistrationLock(), getSelfUnidentifiedAccessKey(), false);
|
||||
}
|
||||
|
||||
public void setProfileName(String name) throws IOException {
|
||||
@@ -396,7 +396,7 @@ public class Manager implements Signal {
|
||||
verificationCode = verificationCode.replace("-", "");
|
||||
account.setSignalingKey(KeyUtils.createSignalingKey());
|
||||
// TODO make unrestricted unidentified access configurable
|
||||
accountManager.verifyAccountWithCode(verificationCode, account.getSignalingKey(), account.getSignalProtocolStore().getLocalRegistrationId(), true, pin, getSelfUnidentifiedAccessKey(), false);
|
||||
accountManager.verifyAccountWithCode(verificationCode, account.getSignalingKey(), account.getSignalProtocolStore().getLocalRegistrationId(), true, pin, null, getSelfUnidentifiedAccessKey(), false);
|
||||
|
||||
//accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));
|
||||
account.setRegistered(true);
|
||||
@@ -407,11 +407,12 @@ public class Manager implements Signal {
|
||||
}
|
||||
|
||||
public void setRegistrationLockPin(Optional<String> pin) throws IOException {
|
||||
accountManager.setPin(pin);
|
||||
if (pin.isPresent()) {
|
||||
account.setRegistrationLockPin(pin.get());
|
||||
throw new RuntimeException("Not implemented anymore, will be replaced with KBS");
|
||||
} else {
|
||||
account.setRegistrationLockPin(null);
|
||||
accountManager.removeV1Pin();
|
||||
}
|
||||
account.save();
|
||||
}
|
||||
@@ -1319,6 +1320,8 @@ public class Manager implements Signal {
|
||||
if (g.getAvatar().isPresent()) {
|
||||
retrieveGroupAvatarAttachment(g.getAvatar().get(), syncGroup.groupId);
|
||||
}
|
||||
syncGroup.inboxPosition = g.getInboxPosition().orNull();
|
||||
syncGroup.archived = g.isArchived();
|
||||
account.getGroupStore().updateGroup(syncGroup);
|
||||
}
|
||||
}
|
||||
@@ -1396,6 +1399,8 @@ public class Manager implements Signal {
|
||||
account.getThreadStore().updateThread(thread);
|
||||
}
|
||||
contact.blocked = c.isBlocked();
|
||||
contact.inboxPosition = c.getInboxPosition().orNull();
|
||||
contact.archived = c.isArchived();
|
||||
account.getContactStore().updateContact(contact);
|
||||
|
||||
if (c.getAvatar().isPresent()) {
|
||||
@@ -1523,7 +1528,7 @@ public class Manager implements Signal {
|
||||
out.write(new DeviceGroup(record.groupId, Optional.fromNullable(record.name),
|
||||
new ArrayList<>(record.getMembers()), createGroupAvatarAttachment(record.groupId),
|
||||
record.active, Optional.fromNullable(info != null ? info.messageExpirationTime : null),
|
||||
Optional.fromNullable(record.color), record.blocked));
|
||||
Optional.fromNullable(record.color), record.blocked, Optional.fromNullable(record.inboxPosition), record.archived));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1572,7 +1577,8 @@ public class Manager implements Signal {
|
||||
out.write(new DeviceContact(record.getAddress(), Optional.fromNullable(record.name),
|
||||
createContactAvatarAttachment(record.number), Optional.fromNullable(record.color),
|
||||
Optional.fromNullable(verifiedMessage), Optional.fromNullable(profileKey), record.blocked,
|
||||
Optional.fromNullable(info != null ? info.messageExpirationTime : null)));
|
||||
Optional.fromNullable(info != null ? info.messageExpirationTime : null),
|
||||
Optional.fromNullable(record.inboxPosition), record.archived));
|
||||
}
|
||||
|
||||
if (account.getProfileKey() != null) {
|
||||
@@ -1581,7 +1587,7 @@ public class Manager implements Signal {
|
||||
Optional.<String>absent(), Optional.<SignalServiceAttachmentStream>absent(),
|
||||
Optional.<String>absent(), Optional.<VerifiedMessage>absent(),
|
||||
Optional.of(account.getProfileKey()),
|
||||
false, Optional.<Integer>absent()));
|
||||
false, Optional.<Integer>absent(), Optional.<Integer>absent(), false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user