1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Add XMPPConnection.sendStanza(Stanza)

and deprecate sendPacket().
This commit is contained in:
Florian Schmaus 2015-03-04 21:44:43 +01:00
parent 183af99ffb
commit ed4fa3390f
58 changed files with 183 additions and 167 deletions

View file

@ -362,7 +362,7 @@ public class ChatManager extends Manager{
if (message.getFrom() == null) {
message.setFrom(connection().getUser());
}
connection().sendPacket(message);
connection().sendStanza(message);
}
PacketCollector createPacketCollector(Chat chat) {

View file

@ -483,7 +483,7 @@ public class Roster extends Manager {
// Create a presence subscription packet and send.
Presence presencePacket = new Presence(Presence.Type.subscribe);
presencePacket.setTo(user);
connection.sendPacket(presencePacket);
connection.sendStanza(presencePacket);
}
/**
@ -1242,7 +1242,7 @@ public class Roster extends Manager {
}
if (response != null) {
response.setTo(presence.getFrom());
connection.sendPacket(response);
connection.sendStanza(response);
}
break;
case unsubscribe:
@ -1252,7 +1252,7 @@ public class Roster extends Manager {
// has unsubscribed to our presence.
response = new Presence(Presence.Type.unsubscribed);
response.setTo(presence.getFrom());
connection.sendPacket(response);
connection.sendStanza(response);
}
// Otherwise, in manual mode so ignore.
break;