1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-18 08:51:08 +01:00

Introduce XMPPConnection.add(Message|Presence)Interceptor

add deprecate addStanzaInterceptor().
This commit is contained in:
Florian Schmaus 2019-10-25 13:57:18 +02:00
parent 5db6191110
commit e2d206e741
24 changed files with 419 additions and 102 deletions

View file

@ -21,8 +21,10 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.xml.namespace.QName;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.MessageView;
import org.jivesoftware.smack.util.XmlStringBuilder;
/**
@ -40,6 +42,8 @@ public class XHTMLExtension implements ExtensionElement {
public static final String ELEMENT = "html";
public static final String NAMESPACE = "http://jabber.org/protocol/xhtml-im";
public static final QName QNAME = new QName(NAMESPACE, ELEMENT);
private final List<CharSequence> bodies = new ArrayList<>();
/**
@ -125,7 +129,7 @@ public class XHTMLExtension implements ExtensionElement {
}
}
public static XHTMLExtension from(Message message) {
return message.getExtension(ELEMENT, NAMESPACE);
public static XHTMLExtension from(MessageView message) {
return message.getExtension(QNAME);
}
}