import org.whispersystems.signalservice.api.groupsv2.GroupsV2Operations;
import org.whispersystems.signalservice.api.push.ServiceIdType;
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
+import org.whispersystems.signalservice.api.registration.RegistrationApi;
import org.whispersystems.signalservice.api.services.ProfileService;
import org.whispersystems.signalservice.api.svr.SecureValueRecovery;
import org.whispersystems.signalservice.api.util.CredentialsProvider;
private SignalServiceAccountManager accountManager;
private GroupsV2Api groupsV2Api;
+ private RegistrationApi registrationApi;
private GroupsV2Operations groupsV2Operations;
private ClientZkOperations clientZkOperations;
if (this.pushServiceSocket != null) {
this.pushServiceSocket.close();
this.pushServiceSocket = null;
+ this.accountManager = null;
+ this.messageReceiver = null;
+ this.messageSender = null;
+ this.profileService = null;
+ this.groupsV2Api = null;
+ this.registrationApi = null;
+ this.secureValueRecovery = null;
}
- this.messageSender = null;
getSignalWebSocket().forceNewWebSockets();
}
return getOrCreate(() -> groupsV2Api, () -> groupsV2Api = getAccountManager().getGroupsV2Api());
}
+ public RegistrationApi getRegistrationApi() {
+ return getOrCreate(() -> registrationApi, () -> registrationApi = getAccountManager().getRegistrationApi());
+ }
+
public GroupsV2Operations getGroupsV2Operations() {
return getOrCreate(() -> groupsV2Operations,
() -> groupsV2Operations = new GroupsV2Operations(ClientZkOperations.create(serviceEnvironmentConfig.signalServiceConfiguration()),