How to get participant avatar inside a prosody plugin

I’m trying to modify mod_muc_size to include the participant avatar.
Right here:

			    for _, pr in occupant:each_session() do
				local nick = pr:get_child_text("nick", "http://jabber.org/protocol/nick") or "";
				local email = pr:get_child_text("email") or "";
                                    local avatar = pr:get_child_text("avatar") or "";
				occupants_json:push({
				    jid = tostring(occupant.nick),
				    email = tostring(email),
                                        avatar = tostring(avatar),
				    display_name = tostring(nick)});
			    end

I have looked at pr:children(), and there isn’t any info about the avatar. What is the correct way to get it?

1 Like

You can print pr to see what is in there.

I have printed, and it doesn’t have anything about avatars…

<presence from=        xml:lang='en'>
    <stats-id></stats-id>
    <c node=  xmlns='http://jabber.org/protocol/caps'/>
    <features>
        <feature var='https://jitsi.org/meet/e2ee'/>
    </features>
    <jitsi_participant_codecType>vp8</jitsi_participant_codecType>
    <email></email>
    <nick xmlns='http://jabber.org/protocol/nick'></nick>
    <jitsi_participant_e2ee.idKey></jitsi_participant_e2ee.idKey>
    <occupant-id xmlns='urn:xmpp:occupant-id:0' id=/>
</presence>

The same problem :frowning: . Other people have any solution?