public final class MessageCorrectionManager extends ExtensionManager
By default this manager is disabled. If you support last message correction, explicitly enable it and check incoming messages for the Replace extension.
xmppSession.getExtensionManager(MessageCorrectionManager.class).setEnabled(true);
Replace replace = message.getExtension(Replace.class);
if (replace != null) {
String oldMessageId = replace.getId();
// Replace old message with message...
}
features, xmppSession| Modifier and Type | Method and Description |
|---|---|
void |
correctMessage(String id,
rocks.xmpp.core.stanza.model.client.Message message)
Corrects a message with a new message by sending the new message and appending the 'replace' extension.
|
setEnabledpublic void correctMessage(String id, rocks.xmpp.core.stanza.model.client.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 XMPP.rocks. All rights reserved.