mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-14 09:01:08 +01:00
Add XMPPConnection.sendStanza(Stanza)
and deprecate sendPacket().
This commit is contained in:
parent
183af99ffb
commit
ed4fa3390f
58 changed files with 183 additions and 167 deletions
|
|
@ -102,7 +102,7 @@ public class MultipleRecipientManager {
|
|||
&& StringUtils.isNullOrEmpty(replyTo) && StringUtils.isNullOrEmpty(replyRoom)) {
|
||||
String toJid = to.iterator().next();
|
||||
packet.setTo(toJid);
|
||||
connection.sendPacket(packet);
|
||||
connection.sendStanza(packet);
|
||||
return;
|
||||
}
|
||||
String serviceAddress = getMultipleRecipienServiceAddress(connection);
|
||||
|
|
@ -155,7 +155,7 @@ public class MultipleRecipientManager {
|
|||
if (replyAddress != null && replyAddress.getJid() != null) {
|
||||
// Send reply to the reply_to address
|
||||
reply.setTo(replyAddress.getJid());
|
||||
connection.sendPacket(reply);
|
||||
connection.sendStanza(reply);
|
||||
}
|
||||
else {
|
||||
// Send reply to multiple recipients
|
||||
|
|
@ -203,19 +203,19 @@ public class MultipleRecipientManager {
|
|||
if (to != null) {
|
||||
for (String jid : to) {
|
||||
packet.setTo(jid);
|
||||
connection.sendPacket(new PacketCopy(packet.toXML()));
|
||||
connection.sendStanza(new PacketCopy(packet.toXML()));
|
||||
}
|
||||
}
|
||||
if (cc != null) {
|
||||
for (String jid : cc) {
|
||||
packet.setTo(jid);
|
||||
connection.sendPacket(new PacketCopy(packet.toXML()));
|
||||
connection.sendStanza(new PacketCopy(packet.toXML()));
|
||||
}
|
||||
}
|
||||
if (bcc != null) {
|
||||
for (String jid : bcc) {
|
||||
packet.setTo(jid);
|
||||
connection.sendPacket(new PacketCopy(packet.toXML()));
|
||||
connection.sendStanza(new PacketCopy(packet.toXML()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -258,7 +258,7 @@ public class MultipleRecipientManager {
|
|||
// Add extension to packet
|
||||
packet.addExtension(multipleAddresses);
|
||||
// Send the packet
|
||||
connection.sendPacket(packet);
|
||||
connection.sendStanza(packet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue