Change web-UI elements from prosody module

Is there any way to change a specific element (in this case, Displayname) of web-UI via prosody custom module? I wrote a simple prosody module which raise when user authenticate successfully and grab its Username, I could log it and its OK but now I want to change the user display name with this value. Should I use XMPP? Or I can change that HTML element directly from my module?

Hello again.
I wrote this module:

local lualdap = require "lualdap";
function getUserInfo(username)
	local ldapHandler = lualdap.open_simple("EXAMPLE.COM","CN=USER,CN=Users,DC=EXAMPLE,DC=COM","PASSWORD");
		if ldapHandler and username then
			for dn, attribs in ldapHandler:search{ base = "DC=EXAMPLE,DC=COM",scope="subtree", attrs = {"sAMAccountName","displayName"} } do
				if attribs and attribs.sAMAccountName == username then
					module:log("info","Profile name = %s",attribs.displayName);
				if not attribs then 
					module:log("info","User name = %s",username);
			module:log("warn","Could not make connection to LDAP for user: ldap");
function onSuccessfullAuthentication(event)
	local currentSession = nil;
	local loggedUsername = nil;
	if event.session then
		currentSession = event.session;
		loggedUsername = currentSession.username;
		if loggedUsername and loggedUsername ~= "jvb" and loggedUsername ~= "focus" then
		module:log("warn","The session is nil.");

It will grab username and then fetch displayName of the username via LDAP then it will log that displayName on console.
I need to change nickname of the user in jitsi-meet conference on web UI. but i have no idea how to do it! maybe XMPP,XML,module:send ,…
Any help?
Thanks in advanced.


IMO the general answer on ‘it is sane to even think to change the UI from prosody’ is NO. In the display name case, since it’s really a logical part of user management, and not a UI feature, there may be a way. Search this forum, for example this was asked a long time ago:

I have no idea if this can be applied on recent Jitsi, there are reference to vcards in current code though.

1 Like

Many thanks.
I saw that. They said it would be a new feature after PR but its not happening yet, So I thought i could implement this feature myself.
Could you tell me how i can use
Thanks again

no idea - I’m hazy about the relation between nickname and display name, not sure if they can have a relation; if you look at nicknames in standard Jitsi-meet, they are random strings. The post was about vcards. It was 4 years ago so maybe something has been implemented since this time.

Nope, that was not implemented. The idea is that vcard is the standard way of populating xmpp accounts with data … and you need and the client (lib-jitsi-meet) to request those and use it. And you need something server side to populate those.

So i must implement some kind of webservice which accept the username as an input then return displayName as a resul, then call it via js on client or top of my head, I think i can write a component (somthing like:" and send my request to that component. So now i should change my question to “Is there any way to fetch username in client side?”
Thanks again