public final class MessageCorrectionManager extends ExtensionManager
By default this manager is disabled. If you support last message correction, explicitly enable it and check inbound messages for the Replace extension.
xmppSession.getManager(MessageCorrectionManager.class).setEnabled(true);
Replace replace = message.getExtension(Replace.class);
if (replace != null) {
String oldMessageId = replace.getId();
// Replace old message with message...
}
| Modifier and Type | Method and Description |
|---|---|
void |
correctMessage(String id,
Message message)
Corrects a message with a new message by sending the new message and appending the 'replace' extension.
|
isEnabled, setEnabledpublic void correctMessage(String id, Message message)
id - The message id of the old message, which shall be corrected.message - The new message, which will replace the old message.Copyright © 2014–2015 XMPP.rocks. All rights reserved.