1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 22:32: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); 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 * Returns the type of the message. If no type has been set this method will return {@link
* org.jivesoftware.smack.packet.Message.Type#normal}. * org.jivesoftware.smack.packet.Message.Type#normal}.