public void processPacket(Packet packet) {
Presence presence = (Presence)packet;
String from = presence.getFrom();
if (from == null) {
// TODO Check if we need to ignore these presences or this is a server bug?
System.out.println("Presence with no FROM: " + presence.toXML());
return;
}
String key = getPresenceMapKey(from);
// If an "available" packet, add it to the presence map. Each presence map will hold