From 013be139c9e3a194d1236af25f0b9597c6010519 Mon Sep 17 00:00:00 2001 From: Maxime Dor Date: Sun, 17 Sep 2017 23:26:22 +0200 Subject: [PATCH] Fix bad copy/paste and bad method scope --- .../io/kamax/mxisd/backend/rest/RestThreePidProvider.java | 7 +++---- src/main/groovy/io/kamax/mxisd/config/MatrixConfig.java | 2 +- .../io/kamax/mxisd/config/rest/RestBackendConfig.java | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/groovy/io/kamax/mxisd/backend/rest/RestThreePidProvider.java b/src/main/groovy/io/kamax/mxisd/backend/rest/RestThreePidProvider.java index c72e3c1..88bcdbe 100644 --- a/src/main/groovy/io/kamax/mxisd/backend/rest/RestThreePidProvider.java +++ b/src/main/groovy/io/kamax/mxisd/backend/rest/RestThreePidProvider.java @@ -81,9 +81,7 @@ public class RestThreePidProvider extends RestProvider implements IThreePidProvi @Override public Optional find(SingleLookupRequest request) { HttpUriRequest req = RestClientUtils.post( - cfg.getEndpoints().getAuth(), - gson, - "lookup", + cfg.getEndpoints().getIdentity().getSingle(), gson, "lookup", new LookupSingleRequestJson(request.getType(), request.getThreePid())); try (CloseableHttpResponse res = client.execute(req)) { @@ -106,7 +104,8 @@ public class RestThreePidProvider extends RestProvider implements IThreePidProvi .map(mapping -> new LookupSingleRequestJson(mapping.getMedium(), mapping.getValue())) .collect(Collectors.toList()); - HttpUriRequest req = RestClientUtils.post(cfg.getEndpoints().getAuth(), gson, "lookup", ioListRequest); + HttpUriRequest req = RestClientUtils.post( + cfg.getEndpoints().getIdentity().getBulk(), gson, "lookup", ioListRequest); try (CloseableHttpResponse res = client.execute(req)) { mappings = new ArrayList<>(); diff --git a/src/main/groovy/io/kamax/mxisd/config/MatrixConfig.java b/src/main/groovy/io/kamax/mxisd/config/MatrixConfig.java index c6cfd2d..f5acfb9 100644 --- a/src/main/groovy/io/kamax/mxisd/config/MatrixConfig.java +++ b/src/main/groovy/io/kamax/mxisd/config/MatrixConfig.java @@ -46,7 +46,7 @@ public class MatrixConfig { } @PostConstruct - private void postConstruct() { + public void build() { log.info("--- Matrix config ---"); if (StringUtils.isBlank(domain)) { diff --git a/src/main/groovy/io/kamax/mxisd/config/rest/RestBackendConfig.java b/src/main/groovy/io/kamax/mxisd/config/rest/RestBackendConfig.java index d5b7dd9..d9a4295 100644 --- a/src/main/groovy/io/kamax/mxisd/config/rest/RestBackendConfig.java +++ b/src/main/groovy/io/kamax/mxisd/config/rest/RestBackendConfig.java @@ -130,7 +130,7 @@ public class RestBackendConfig { } @PostConstruct - private void postConstruct() { + public void build() { log.info("--- REST backend config ---"); log.info("Enabled: {}", isEnabled());