aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/xmpp
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-30 14:18:56 +0300
committerGravatar Vitaly Takmazov2018-03-30 14:18:56 +0300
commita746598faef08af794c66d65ba9324bee5043b73 (patch)
treeeff6bd472547df069b3fcbd3da2e29f750d58626 /juick-server/src/main/java/com/juick/server/xmpp
parent42e2a727c2bc15ac15c9a3af66f126dbefe508a2 (diff)
server: process everything in one place
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/xmpp')
-rw-r--r--juick-server/src/main/java/com/juick/server/xmpp/helpers/CommandResult.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/xmpp/helpers/CommandResult.java b/juick-server/src/main/java/com/juick/server/xmpp/helpers/CommandResult.java
new file mode 100644
index 00000000..f952b579
--- /dev/null
+++ b/juick-server/src/main/java/com/juick/server/xmpp/helpers/CommandResult.java
@@ -0,0 +1,28 @@
+package com.juick.server.xmpp.helpers;
+
+import com.juick.Message;
+
+public class CommandResult {
+ private String text;
+ private Message newMessage;
+
+ public String getText() {
+ return text;
+ }
+
+ public Message getNewMessage() {
+ return newMessage;
+ }
+ public static CommandResult fromMessage(Message newMessage, String text) {
+ CommandResult result = new CommandResult();
+ result.newMessage = newMessage;
+ result.text = text;
+ return result;
+ }
+ public static CommandResult fromString(String text) {
+ CommandResult result = new CommandResult();
+ result.text = text;
+ return result;
+ }
+
+}