public void addRealJidToMessage(Message message, MUCOccupant sender) {
        Element addresses = DocumentHelper.createElement(QName.get("addresses", "http://jabber.org/protocol/address"));
        Element address = addresses.addElement("address");
        address.addAttribute("type", "ofrom");
        address.addAttribute("jid", sender.getUserAddress().toString());
        message.addExtension(new PacketExtension(addresses));
    }
Based on XEP-0045, section 7.2.13:
If the room is non-anonymous, the service MAY include an
Extended Stanza Addressing (XEP-0033) [16] element that notes the original
full JID of the sender by means of the "ofrom" address type
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java