From ba2df2a9957b8eb6dbada7fa4fea08c6ba8f34a3 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 1 Dec 2014 14:40:58 +0100 Subject: [PATCH] Add Message(String,String) --- .../java/org/jivesoftware/smack/packet/Message.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java index 13c41f54d..9d76a771c 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java @@ -87,6 +87,17 @@ public final class Message extends Packet { setType(type); } + /** + * Creates a new message to the specified recipient and with the specified body. + * + * @param to the user to send the message to. + * @param body the body of the message. + */ + public Message(String to, String body) { + this(to); + setBody(body); + } + /** * Returns the type of the message. If no type has been set this method will return {@link * org.jivesoftware.smack.packet.Message.Type#normal}.