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:
parent
f7fcff139c
commit
f633313c4a
1 changed files with 17 additions and 0 deletions
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue