1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +01:00

Add Message(String,String)

This commit is contained in:
Florian Schmaus 2014-12-01 14:40:58 +01:00
parent 15d60ea876
commit ba2df2a995

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