public final class Replace
extends java.lang.Object
The implementation of the <replace/>
element in the urn:xmpp:message-correct:0
namespace.
xmppClient.enableFeature(Replace.NAMESPACE);
Replace replace = message.getExtension(Replace.class);
if (replace != null) {
String oldMessageId = replace.getId();
// Replace old message with message...
}
Message correctedMessage = new Message(jid, Message.Type.CHAT, "This is the corrected text");
correctedMessage.addExtension(new Replace(id));
xmppClient.send(correctedMessage);
This class is immutable.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
urn:xmpp:message-correct:0
|
Constructor and Description |
---|
Replace(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Gets the id of the message which shall be corrected.
|
java.lang.String |
toString() |
public static final java.lang.String NAMESPACE
urn:xmpp:message-correct:0
Copyright © 2014–2019 XMPP.rocks. All rights reserved.