- return new SignalServiceConfiguration(
- new SignalServiceUrl[]{new SignalServiceUrl(URL, TRUST_STORE)},
- makeSignalCdnUrlMapFor(new SignalCdnUrl[]{new SignalCdnUrl(CDN_URL, TRUST_STORE)}, new SignalCdnUrl[]{new SignalCdnUrl(CDN2_URL, TRUST_STORE)}),
- new SignalContactDiscoveryUrl[0],
+ boolean zkGroupAvailable;
+ try {
+ new ServerPublicParams(zkGroupServerPublicParams);
+ zkGroupAvailable = true;
+ } catch (Throwable ignored) {
+ zkGroupAvailable = false;
+ }
+ capabilities = new AccountAttributes.Capabilities(false, zkGroupAvailable, false, zkGroupAvailable);
+ }
+
+ public static SignalServiceConfiguration createDefaultServiceConfiguration(String userAgent) {
+ final Interceptor userAgentInterceptor = chain -> chain.proceed(chain.request()
+ .newBuilder()
+ .header("User-Agent", userAgent)
+ .build());
+
+ final List<Interceptor> interceptors = Collections.singletonList(userAgentInterceptor);
+
+ return new SignalServiceConfiguration(new SignalServiceUrl[]{new SignalServiceUrl(URL, TRUST_STORE)},
+ makeSignalCdnUrlMapFor(new SignalCdnUrl[]{new SignalCdnUrl(CDN_URL, TRUST_STORE)},
+ new SignalCdnUrl[]{new SignalCdnUrl(CDN2_URL, TRUST_STORE)}),
+ new SignalContactDiscoveryUrl[]{new SignalContactDiscoveryUrl(SIGNAL_CONTACT_DISCOVERY_URL,
+ TRUST_STORE)},