1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-16 10:01:08 +01:00

Use Jid (and subclasses) from jxmpp-jid

Fixes SMACK-634
This commit is contained in:
Florian Schmaus 2015-02-14 17:15:02 +01:00
parent 0ee2d9ed1e
commit 5bb4727c57
180 changed files with 1510 additions and 1032 deletions

View file

@ -38,6 +38,7 @@ import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.roster.Roster;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jxmpp.jid.Jid;
/**
* Manager for XEP-0184: Message Delivery Receipts. This class implements
@ -142,7 +143,7 @@ public class DeliveryReceiptManager extends Manager {
connection.addAsyncPacketListener(new PacketListener() {
@Override
public void processPacket(Stanza packet) throws NotConnectedException, InterruptedException {
final String from = packet.getFrom();
final Jid from = packet.getFrom();
final XMPPConnection connection = connection();
switch (autoReceiptMode) {
case disabled:
@ -190,7 +191,7 @@ public class DeliveryReceiptManager extends Manager {
* @throws XMPPException
* @throws InterruptedException
*/
public boolean isSupported(String jid) throws SmackException, XMPPException, InterruptedException {
public boolean isSupported(Jid jid) throws SmackException, XMPPException, InterruptedException {
return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid,
DeliveryReceipt.NAMESPACE);
}

View file

@ -17,6 +17,7 @@
package org.jivesoftware.smackx.receipts;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
/**
* Interface for received receipt notifications.
@ -36,5 +37,5 @@ public interface ReceiptReceivedListener {
* @param receiptId the message ID of the packet which has been received and this receipt is for
* @param receipt the receipt
*/
void onReceiptReceived(String fromJid, String toJid, String receiptId, Stanza receipt);
void onReceiptReceived(Jid fromJid, Jid toJid, String receiptId, Stanza receipt);
}