mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Reformat project
This commit is contained in:
parent
4f2261e86f
commit
591c0fe8a3
51 changed files with 579 additions and 335 deletions
|
@ -70,12 +70,19 @@ public class ProvisioningManager {
|
|||
public String getDeviceLinkUri() throws TimeoutException, IOException {
|
||||
String deviceUuid = accountManager.getNewDeviceUuid();
|
||||
|
||||
return Utils.createDeviceLinkUri(new Utils.DeviceLinkInfo(deviceUuid, identityKey.getPublicKey().getPublicKey()));
|
||||
return Utils.createDeviceLinkUri(new Utils.DeviceLinkInfo(deviceUuid,
|
||||
identityKey.getPublicKey().getPublicKey()));
|
||||
}
|
||||
|
||||
public String finishDeviceLink(String deviceName) throws IOException, InvalidKeyException, TimeoutException, UserAlreadyExists {
|
||||
String signalingKey = KeyUtils.createSignalingKey();
|
||||
SignalServiceAccountManager.NewDeviceRegistrationReturn ret = accountManager.finishNewDeviceRegistration(identityKey, signalingKey, false, true, registrationId, deviceName);
|
||||
SignalServiceAccountManager.NewDeviceRegistrationReturn ret = accountManager.finishNewDeviceRegistration(
|
||||
identityKey,
|
||||
signalingKey,
|
||||
false,
|
||||
true,
|
||||
registrationId,
|
||||
deviceName);
|
||||
|
||||
String username = ret.getNumber();
|
||||
// TODO do this check before actually registering
|
||||
|
@ -96,7 +103,15 @@ public class ProvisioningManager {
|
|||
}
|
||||
}
|
||||
|
||||
try (SignalAccount account = SignalAccount.createLinkedAccount(pathConfig.getDataPath(), username, ret.getUuid(), password, ret.getDeviceId(), ret.getIdentity(), registrationId, signalingKey, profileKey)) {
|
||||
try (SignalAccount account = SignalAccount.createLinkedAccount(pathConfig.getDataPath(),
|
||||
username,
|
||||
ret.getUuid(),
|
||||
password,
|
||||
ret.getDeviceId(),
|
||||
ret.getIdentity(),
|
||||
registrationId,
|
||||
signalingKey,
|
||||
profileKey)) {
|
||||
account.save();
|
||||
|
||||
try (Manager m = new Manager(account, pathConfig, serviceConfiguration, userAgent)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue