aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/XMPPManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/XMPPManager.java')
-rw-r--r--src/main/java/com/juick/server/XMPPManager.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/com/juick/server/XMPPManager.java b/src/main/java/com/juick/server/XMPPManager.java
index 94fe0d1e..5c58345a 100644
--- a/src/main/java/com/juick/server/XMPPManager.java
+++ b/src/main/java/com/juick/server/XMPPManager.java
@@ -17,7 +17,7 @@
package com.juick.server;
-import com.juick.User;
+import com.juick.model.User;
import com.juick.formatters.PlainTextFormatter;
import com.juick.model.CommandResult;
import com.juick.server.api.SystemActivity;
@@ -126,7 +126,7 @@ public class XMPPManager implements NotificationListener {
public void init() {
logger.info("xmpp component start connecting to {}", componentPort);
XmppSessionConfiguration configuration = XmppSessionConfiguration.builder()
- .extensions(Extension.of(com.juick.Message.class), Extension.of(MessageQuery.class))
+ .extensions(Extension.of(com.juick.model.Message.class), Extension.of(MessageQuery.class))
.debugger(LogbackDebugger.class)
.defaultResponseTimeout(Duration.ofMillis(120000))
.build();
@@ -269,13 +269,13 @@ public class XMPPManager implements NotificationListener {
serviceUser = userService.getUserByName(serviceUsername);
}
- private void sendJuickMessage(com.juick.Message jmsg, List<User> users) {
+ private void sendJuickMessage(com.juick.model.Message jmsg, List<User> users) {
List<String> jids = new ArrayList<>();
for (User user : users) {
jids.addAll(userService.getJIDsbyUID(user.getUid()));
}
- com.juick.Message fullMsg = messagesService.getMessage(jmsg.getMid()).orElseThrow(IllegalStateException::new);
+ com.juick.model.Message fullMsg = messagesService.getMessage(jmsg.getMid()).orElseThrow(IllegalStateException::new);
String txt = "@" + jmsg.getUser().getName() + ":" + MessageUtils.getTagsString(fullMsg) + "\n";
String attachmentUrl = MessageUtils.attachmentUrl(fullMsg);
if (StringUtils.isNotEmpty(attachmentUrl)) {
@@ -307,14 +307,14 @@ public class XMPPManager implements NotificationListener {
}
}
- private void sendJuickComment(com.juick.Message jmsg, List<User> users) {
+ private void sendJuickComment(com.juick.model.Message jmsg, List<User> users) {
String replyQuote;
String replyTo;
- com.juick.Message replyMessage = jmsg.getReplyto() > 0 ? messagesService.getReply(jmsg.getMid(), jmsg.getReplyto())
+ com.juick.model.Message replyMessage = jmsg.getReplyto() > 0 ? messagesService.getReply(jmsg.getMid(), jmsg.getReplyto())
: messagesService.getMessage(jmsg.getMid()).orElseThrow(IllegalStateException::new);
replyTo = replyMessage.getUser().getName();
- com.juick.Message fullReply = messagesService.getReply(jmsg.getMid(), jmsg.getRid());
+ com.juick.model.Message fullReply = messagesService.getReply(jmsg.getMid(), jmsg.getRid());
replyQuote = StringUtils.defaultString(fullReply.getReplyQuote());
String txt = "Reply by @" + jmsg.getUser().getName() + ":\n" + replyQuote + "\n@" + replyTo + " ";
@@ -351,7 +351,7 @@ public class XMPPManager implements NotificationListener {
}
}
}
- private void processMessage(com.juick.Message msg, List<User> subscribers) {
+ private void processMessage(com.juick.model.Message msg, List<User> subscribers) {
if (msg.isService()) {
return;
}
@@ -388,7 +388,7 @@ public class XMPPManager implements NotificationListener {
return ClientMessage.from(reply);
}
- public void processLike(User liker, com.juick.Message jmsg, List<User> users) {
+ public void processLike(User liker, com.juick.model.Message jmsg, List<User> users) {
if (!userService.isInBLAny(jmsg.getUser().getUid(), liker.getUid())) {
userService.getJIDsbyUID(jmsg.getUser().getUid()).forEach(authorJid -> {
Message xmppMessage = new Message();
@@ -456,7 +456,7 @@ public class XMPPManager implements NotificationListener {
});
}
- public void processTop(com.juick.Message message) {
+ public void processTop(com.juick.model.Message message) {
try {
commandsManager.processCommand(serviceUser, String.format("! #%d", message.getMid()), URI.create(StringUtils.EMPTY));
} catch (Exception e) {