Add Message(String,String)

This commit is contained in:
Florian Schmaus 2014-12-01 14:40:58 +01:00
parent 15d60ea876
commit ba2df2a995
1 changed files with 11 additions and 0 deletions

View File

@ -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}.