@GuardedBy("this")
    private void updatePresence() {
        if (extendedInformation != null && presence != null) {
            // Remove any previous extendedInformation, then re-add it.
            final Element presenceEl = presence.getElement();
            presenceEl.elements(QName.get("x", "http://jabber.org/protocol/muc#user"))
                .forEach(presenceEl::remove);

            Element exi = extendedInformation.createCopy();
            presenceEl.add(exi);
            cacheSize = -1;
        }
    }
Calculates and sets the extended presence information to add to the presence.
The information to add contains the user's jid, affiliation and role.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCOccupant.java