public static boolean isPresenceUpdateReflection( final Packet packet ) {
        return packet instanceof Presence && packet.getTo() != null && packet.getTo().equals( packet.getFrom() );
    }
Checks if the packet is a presence stanza that intends to reflect an update back to the client from which the update originated.

@param packet The stanza (cannot be null.
@return true if the packet is presence reflection, otherwise false.
xmppserver/src/main/java/org/jivesoftware/openfire/handler/PresenceUpdateHandler.java