How can I get the user's name through a js on click event?

Hi I’m working on a Q&A Moderated Chat System. We’re using Prosody (I think web sockets too) and the lib-jitsi-meet API (low level). Is there a function or method for getting the users’ name after they click on a normal HTML button with event? I’m using JQuery/Javascript. I can get the User’s Id with this function from the API room.myUserId(). I’m able to get the user’s name after they send a chat message but I’m trying to get their name before they send a chat message. Is there any function or any way to get the user’s name through a js click event?'nick').value where conference is JitsiConference.

Sorry I don’t know what the conference is in this case.
When I try this'nick').value
I get ReferenceError: conference is not defined
I’m initializing the conference like this:
room = connection.initJitsiConference(roomName, confOptions);

And when I just try room.getFromPresence('nick').value
I get TypeError: room.getFromPresence is not a function

conference is your instance of JitsiConference that you created through the JitsiMeetJS.