diff options
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Message.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index b468fef7..cc6bc7c2 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -32,6 +32,7 @@ public class Message extends AbstractEntity { public static final int TYPE_TEXT = 0; public static final int TYPE_IMAGE = 1; public static final int TYPE_AUDIO = 2; + public static final int TYPE_STATUS = 3; public static String CONVERSATION = "conversationUuid"; public static String COUNTERPART = "counterpart"; @@ -54,6 +55,10 @@ public class Message extends AbstractEntity { protected transient Conversation conversation = null; protected transient JingleConnection jingleConnection = null; + + private Message() { + + } public Message(Conversation conversation, String body, int encryption) { this(java.util.UUID.randomUUID().toString(), conversation.getUuid(), @@ -205,4 +210,11 @@ public class Message extends AbstractEntity { public JingleConnection getJingleConnection() { return this.jingleConnection; } + + public static Message createStatusMessage(Conversation conversation) { + Message message = new Message(); + message.setType(Message.TYPE_STATUS); + message.setConversation(conversation); + return message; + } } |