From a746598faef08af794c66d65ba9324bee5043b73 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 30 Mar 2018 14:18:56 +0300 Subject: server: process everything in one place --- .../juick/server/xmpp/helpers/CommandResult.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 juick-server/src/main/java/com/juick/server/xmpp/helpers/CommandResult.java (limited to 'juick-server/src/main/java/com/juick/server/xmpp') 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; + } + +} -- cgit v1.2.3