package hello;

/**
 * Class that determines what to do with a message
 * @author Zach Panzarino
 * @version 1.0.0
 */
public class Text {
    private String number, text;
    /**
     * Creates a new text and stores the text
     * @param num Sending phone number
     * @param content The content of the message
     */
    public Text(String num, String content){
        number = num;
        text = content;
    }
    /**
     * Determines what to do with a message
     * @return Whether the message was successfully executed
     */
    public void execute(){
        if (text.startsWith("/")){
            int space = text.indexOf(" ");
            if (space != 1){
                String command = text.substring(1, space);
                String content = text.substring(space+1);
                if (command.equals("create")){
                    Action.create(number, content);
                    return;
                }
                if (command.equals("join")){
                    Action.join(number, content);
                    return;
                }
                if (command.equals("leave")){
                    Action.leave(number);
                    return;
                }
            }
        }
        Action.message(number, text);
        return;
    }
}
@@ -560,16 +560,62 @@
 cute()%7B%0A
+        if (text!=null && number!= null)%7B%0A    
         
@@ -637,24 +637,28 @@
 With(%22/%22))%7B%0A
+    
             
@@ -696,24 +696,28 @@
             
+ 
+   
 if (space !=
@@ -721,16 +721,20 @@
  != 1)%7B%0A
+    
         
@@ -792,32 +792,36 @@
                 
+  
+  
 String content =
@@ -854,32 +854,36 @@
                 
+    
 if (command.equa
@@ -913,24 +913,28 @@
             
+  
+  
 Action.creat
@@ -965,32 +965,36 @@
                 
+    
 return;%0A        
@@ -993,34 +993,42 @@
                 
+   
+ 
 %7D%0A
+    
                 
@@ -1072,24 +1072,28 @@
             
+   
+ 
 Action.join(
@@ -1126,32 +1126,36 @@
             
+    
 return;%0A
             
@@ -1134,32 +1134,36 @@
         return;%0A
+    
                 
@@ -1172,32 +1172,36 @@
                 
+    
 if (command.equa
@@ -1210,24 +1210,28 @@
 (%22leave%22))%7B%0A
+    
             
@@ -1276,32 +1276,36 @@
             
+    
 return;%0A
             
@@ -1284,32 +1284,54 @@
         return;%0A
+                    %7D%0A
                 
@@ -1347,33 +1347,24 @@
      %7D%0A 
-       %7D%0A
         
 Action.m
@@ -1351,24 +1351,27 @@
  %7D%0A         
+   
 Action.messa
@@ -1392,27 +1392,31 @@
 t);%0A        
+    
 return;%0A
     %7D%0A%7D
@@ -1404,19 +1404,29 @@
     return;%0A
+        %7D%0A
     %7D%0A%7D

Fix server error