@Nonnull
    private Presence createAnonCopy(@Nonnull Presence presence)
    {
        final Presence result = presence.createCopy();
        final Element frag = result.getChildElement("x", "http://jabber.org/protocol/muc#user");
        frag.element("item").addAttribute("jid", null);
        return result;
    }
Creates a copy of the presence stanza encapsulated in the argument, that is suitable to be sent to entities that
have no permission to view the real JID of the sender.

@param presence The object encapsulating the presence to be broadcast.
@return A copy of the stanza to be broadcast.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java