From 4270d6b384b72491a7cc3440cc154049e9ad567e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 11 Sep 2018 09:49:48 +0300 Subject: XMPP: do not start when jid is not set --- juick-server/src/main/java/com/juick/server/api/Index.java | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/api') 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 0faf270f..947ac920 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 @@ -43,8 +43,6 @@ import java.util.stream.Collectors; public class Index { @Inject private WebsocketManager wsHandler; - @Inject - private XMPPServer xmpp; @RequestMapping(value = { "/api/", "/ws/" }, method = RequestMethod.GET, headers = "Connection!=Upgrade") public ResponseEntity description() { @@ -56,14 +54,4 @@ public class Index { public Status status() { return Status.getStatus(String.valueOf(wsHandler.getClients().size())); } - @RequestMapping(method = RequestMethod.GET, value = "/api/xmpp-status", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) - public XMPPStatus xmppStatus() { - XMPPStatus status = new XMPPStatus(); - if (xmpp != null) { - 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; - } } -- cgit v1.2.3