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/Post.java6
1 files changed, 3 insertions, 3 deletions
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 ef0c7dd9..e949dad7 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
@@ -106,7 +106,7 @@ public class Post {
throw new HttpBadRequestException();
}
}
- xmppConnection.incomingMessageJuick(visitor, null, body, attachmentFName);
+ commandsManager.processCommand(visitor, null, body, attachmentFName);
}
@PostMapping("/upload")
public String doUploadFile(@RequestParam(required = true) MultipartFile attach) {
@@ -163,7 +163,7 @@ public class Post {
}
}
- return xmppConnection.incomingMessageJuick(visitor, null, body, attachmentFName);
+ return commandsManager.processCommand(visitor, null, body, attachmentFName).getNewMessage();
}
Session session = Session.getDefaultInstance(new Properties());
@@ -227,7 +227,7 @@ public class Post {
}
URI attachmentUri = StringUtils.isNotEmpty(attachmentFName[0]) ? URI.create(String.format("juick://%s", attachmentFName[0]))
: URI.create(StringUtils.EMPTY);
- xmppConnection.incomingMessageJuick(visitor, null, body[0], attachmentUri);
+ commandsManager.processCommand(visitor, null, body[0], attachmentUri);
} else {
logger.info("not registered: {}", from);
}