1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-10-31 22:15:59 +01: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); 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. * Sets the body of the message. The body is the main message contents.
* *