aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Index.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Index.java b/juick-server/src/main/java/com/juick/server/api/Index.java
index eafde85b..5ffa6341 100644
--- a/juick-server/src/main/java/com/juick/server/api/Index.java
+++ b/juick-server/src/main/java/com/juick/server/api/Index.java
@@ -28,10 +28,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
+import rocks.xmpp.addr.Jid;
import springfox.documentation.annotations.ApiIgnore;
import javax.inject.Inject;
import java.net.URI;
+import java.util.stream.Collectors;
/**
* Created by vitalyster on 25.07.2016.
@@ -58,8 +60,9 @@ public class Index {
public XMPPStatus xmppStatus() {
XMPPStatus status = new XMPPStatus();
if (xmpp != null) {
- status.setInbound(xmpp.getInConnections());
- status.setOutbound(xmpp.getOutConnections().keySet());
+ status.setInbound(xmpp.getInConnections().stream().map(c -> c.from).flatMap(j -> j.stream().map(Jid::getDomain)).collect(Collectors.toList()));
+ status.setOutbound(xmpp.getOutConnections().keySet().stream()
+ .map(c -> c.to).map(Jid::getDomain).collect(Collectors.toList()));
}
return status;
}