mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Smack 4.1.1
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJVTgmuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41MXUH/3A5Jc6rzALhnXMT4yj+jXow rLLX5/ypOvkAXEMRlTf9xd2apz4hT8dMsBcL3JvZscuVmkw0/woh9eV/PFSDoc7t HA7bMZRqWqUuVOezFD0ggHsJ7zfpcIuxsgoNARQlCRMPHzCLzKhMNctz5UApAdfy +wPpTMpc3K5SM1bNlM60qp+dbPCqQcLwYP02KrOQASgenVDm6iKFpzx0ieVpPY1M hOBMyaZg3n2j+267gpqBG6c7PVmEq3deAlB6BOBAsL/Bp1w5B5Smq959LWJLstrU /LeYJFi1TeIASiFy1vZyTV0Tw+Pe++3gB6ppLqkQhfWV8vXzm0coCXx29qWxAzM= =pGJt -----END PGP SIGNATURE----- Merge tag '4.1.1' Smack 4.1.1 Conflicts: smack-extensions/src/main/java/org/jivesoftware/smackx/caps/provider/CapsExtensionProvider.java smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java smack-java7/src/main/java/org/jivesoftware/smack/java7/Java7SmackInitializer.java version.gradle
This commit is contained in:
commit
bbc7aaae77
9 changed files with 112 additions and 15 deletions
|
@ -51,7 +51,8 @@ public class CapsExtensionProvider extends ExtensionElementProvider<CapsExtensio
|
|||
if (hash != null && version != null && node != null) {
|
||||
return new CapsExtension(node, version, hash);
|
||||
} else {
|
||||
throw new SmackException("Caps element with missing attributes");
|
||||
throw new SmackException("Caps elment with missing attributes. Attributes: hash=" + hash + " version="
|
||||
+ version + " node=" + node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.jivesoftware.smack.XMPPConnectionRegistry;
|
|||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
import org.jivesoftware.smack.filter.MessageTypeFilter;
|
||||
import org.jivesoftware.smack.filter.NotFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaExtensionFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaTypeFilter;
|
||||
|
@ -234,6 +235,16 @@ public final class DeliveryReceiptManager extends Manager {
|
|||
receiptReceivedListeners.remove(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* A filter for stanzas to request delivery receipts for. Notably those are message stanzas of type normal, chat or
|
||||
* headline, which <b>do not</b>contain a delivery receipt, i.e. are ack messages.
|
||||
*
|
||||
* @see <a href="http://xmpp.org/extensions/xep-0184.html#when-ack">XEP-184 § 5.4 Ack Messages</a>
|
||||
*/
|
||||
private static final StanzaFilter MESSAGES_TO_REQUEST_RECEIPTS_FOR = new AndFilter(
|
||||
MessageTypeFilter.NORMAL_OR_CHAT_OR_HEADLINE, new NotFilter(new StanzaExtensionFilter(
|
||||
DeliveryReceipt.ELEMENT, DeliveryReceipt.NAMESPACE)));
|
||||
|
||||
private static final StanzaListener AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER = new StanzaListener() {
|
||||
@Override
|
||||
public void processPacket(Stanza packet) throws NotConnectedException {
|
||||
|
@ -249,8 +260,8 @@ public final class DeliveryReceiptManager extends Manager {
|
|||
* @see #dontAutoAddDeliveryReceiptRequests()
|
||||
*/
|
||||
public void autoAddDeliveryReceiptRequests() {
|
||||
connection().addPacketSendingListener(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER,
|
||||
MessageTypeFilter.NORMAL_OR_CHAT_OR_HEADLINE);
|
||||
connection().addPacketInterceptor(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER,
|
||||
MESSAGES_TO_REQUEST_RECEIPTS_FOR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -260,7 +271,7 @@ public final class DeliveryReceiptManager extends Manager {
|
|||
* @see #autoAddDeliveryReceiptRequests()
|
||||
*/
|
||||
public void dontAutoAddDeliveryReceiptRequests() {
|
||||
connection().removePacketSendingListener(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER);
|
||||
connection().removePacketInterceptor(AUTO_ADD_DELIVERY_RECEIPT_REQUESTS_LISTENER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue