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", "") or "";
				local email = pr:get_child_text("email") or "";
                                    local avatar = pr:get_child_text("avatar") or "";
				    jid = tostring(occupant.nick),
				    email = tostring(email),
                                        avatar = tostring(avatar),
				    display_name = tostring(nick)});

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'>
    <c node=  xmlns=''/>
        <feature var=''/>
    <nick xmlns=''></nick>
    <occupant-id xmlns='urn:xmpp:occupant-id:0' id=/>

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