@@ -19,7 +19,18 @@ public class Conversation extends TypedData {
1919
2020 private static final HashMap <String , String > SENTINEL = Maps .newHashMap ();
2121 private static final List <String > DISPLAY_AS_FORMATS = Lists .newArrayList ("plaintext" , "html" );
22- private static final List <String > MESSAGE_TYPES = Lists .newArrayList ("note" , "comment" , "assign" , "open" , "close" );
22+ static final String MESSAGE_TYPE_ASSIGNMENT = "assignment" ;
23+ static final String MESSAGE_TYPE_COMMENT = "comment" ;
24+ static final String MESSAGE_TYPE_NOTE = "note" ;
25+ static final String MESSAGE_TYPE_CLOSE = "close" ;
26+ static final String MESSAGE_TYPE_OPEN = "open" ;
27+ static final List <String > MESSAGE_TYPES = Lists .newArrayList (
28+ MESSAGE_TYPE_ASSIGNMENT ,
29+ MESSAGE_TYPE_COMMENT ,
30+ MESSAGE_TYPE_NOTE ,
31+ MESSAGE_TYPE_CLOSE ,
32+ MESSAGE_TYPE_OPEN
33+ );
2334
2435 public static Conversation find (String id ) throws InvalidException , AuthorizationException {
2536 final HttpClient resource = new HttpClient (UriBuilder .newBuilder ().path ("conversations" ).path (id ).build ());
@@ -99,8 +110,8 @@ static void validateAdminReplyRequest(AdminReply reply) {
99110 validateMessageType (reply );
100111
101112 if (reply .getAssigneeID () != null
102- && !"assign " .equals (reply .getMessageType ())) {
103- throw new InvalidException ("an assignee id can be set only for a message type of assign " );
113+ && !"assignment " .equals (reply .getMessageType ())) {
114+ throw new InvalidException ("an assignee id can be set only for a message type of assignment " );
104115 }
105116
106117 if (("note" .equals (reply .getMessageType ()) || "comment" .equals (reply .getMessageType ()))
0 commit comments