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

Add Message.setBody(CharSequence)

This commit is contained in:
Florian Schmaus 2017-01-02 00:47:25 +01:00
parent f7fcff139c
commit f633313c4a

View file

@ -332,6 +332,23 @@ public final class Message extends Stanza implements TypedCloneable<Message> {
return Collections.unmodifiableSet(bodies);
}
/**
* Sets the body of the message.
*
* @param body the body of the message.
* @see #setBody(String)
* @since 4.2
*/
public void setBody(CharSequence body) {
String bodyString;
if (body != null) {
bodyString = body.toString();
} else {
bodyString = null;
}
setBody(bodyString);
}
/**
* Sets the body of the message. The body is the main message contents.
*