aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/server/XMPPManager.java32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/main/java/com/juick/server/XMPPManager.java b/src/main/java/com/juick/server/XMPPManager.java
index fb8f9711..9b886784 100644
--- a/src/main/java/com/juick/server/XMPPManager.java
+++ b/src/main/java/com/juick/server/XMPPManager.java
@@ -189,13 +189,6 @@ public class XMPPManager implements NotificationListener {
router.send(result);
}
});
- router.addInboundIQListener(e -> {
- IQ iq = e.getIQ();
- Jid jid = iq.getTo();
- if (!jid.getDomain().equals(this.jid.getDomain())) {
- router.send(iq);
- }
- });
FileTransferManager fileTransferManager = router.getManager(FileTransferManager.class);
fileTransferManager.addFileTransferOfferListener(e -> {
try {
@@ -273,16 +266,6 @@ public class XMPPManager implements NotificationListener {
serviceUser = userService.getUserByName(serviceUsername);
}
- private String stanzaToString(Stanza stanza) throws XMLStreamException, JAXBException {
- StringWriter stanzaWriter = new StringWriter();
- XMLStreamWriter xmppStreamWriter = XmppUtils.createXmppStreamWriter(
- router.getConfiguration().getXmlOutputFactory().createXMLStreamWriter(stanzaWriter));
- router.createMarshaller().marshal(stanza, xmppStreamWriter);
- xmppStreamWriter.flush();
- xmppStreamWriter.close();
- return stanzaWriter.toString();
- }
-
private void sendJuickMessage(com.juick.Message jmsg, List<User> users) {
List<String> jids = new ArrayList<>();
@@ -321,7 +304,7 @@ public class XMPPManager implements NotificationListener {
}
}
- public void sendJuickComment(com.juick.Message jmsg, List<User> users) {
+ private void sendJuickComment(com.juick.Message jmsg, List<User> users) {
String replyQuote;
String replyTo;
@@ -600,15 +583,6 @@ public class XMPPManager implements NotificationListener {
} catch (Exception e1) {
logger.warn("message exception", e1);
}
- } else if (to.getDomain().endsWith(jid.getDomain()) && (to.getDomain().equals(jid.getDomain())
- || to.getDomain().endsWith("." + jid.getDomain()))) {
- if (logger.isInfoEnabled()) {
- try {
- logger.info("unhandled message: {}", stanzaToString(msg));
- } catch (JAXBException | XMLStreamException ex) {
- logger.error("JAXB exception", ex);
- }
- }
} else {
return ClientMessage.from(msg);
}
@@ -671,8 +645,4 @@ public class XMPPManager implements NotificationListener {
router.close();
}
}
-
- public ExternalComponent getRouter() {
- return router;
- }
}