From 5b5ca32a22e2e8e95c9bca86ce23d19c4a69f83d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 2 Apr 2018 16:47:02 +0300 Subject: xmpp: move to library project --- juick-server/src/main/java/com/juick/server/api/Post.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/api') diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java index 3d9703fd..312df52d 100644 --- a/juick-server/src/main/java/com/juick/server/api/Post.java +++ b/juick-server/src/main/java/com/juick/server/api/Post.java @@ -71,7 +71,7 @@ public class Post { @Inject private UserService userService; @Inject - private ServerManager serverManager; + private XMPPConnection xmppConnection; @Inject private MessagesService messagesService; @Inject @@ -112,7 +112,7 @@ public class Post { throw new HttpBadRequestException(); } } - serverManager.processMessage(visitor, body, attachmentFName); + xmppConnection.processMessage(visitor, body, attachmentFName); } @PostMapping("/upload") public String doUploadFile(@RequestParam(required = true) MultipartFile attach) { @@ -169,7 +169,7 @@ public class Post { } } - return serverManager.processMessage(visitor, body, attachmentFName); + return xmppConnection.processMessage(visitor, body, attachmentFName); } Session session = Session.getDefaultInstance(new Properties()); @@ -231,7 +231,7 @@ public class Post { body[0] = rid > 0 ? String.format("#%d/%d %s", mid, rid, body[0]) : String.format("#%d %s", mid, body[0]); } - serverManager.processMessage(visitor, body[0], attachmentFName[0]); + xmppConnection.processMessage(visitor, body[0], attachmentFName[0]); } else { logger.info("not registered: {}", from); } -- cgit v1.2.3