Can we access jitsi user attributes at Prosody level?

Hi,

We can set local participant properties after the jitsi conference initiation using setLocalParticipantProperty function. Can these data be accessed in the Prosody level?

For my understanding, the Prosody service maintains an MUC parallel to the conference which does the signalling part and messaging. My concern is does Prosody store additional data as well?

For example, we have the mod_muc_size.lua plugin to get the room occupants information. It has the following code block to loop through the room occupants.

local occupants = room._occupants;
if occupants then
	participant_count = iterators.count(room:each_occupant());
	for _, occupant in room:each_occupant() do
	    -- filter focus as we keep it as hidden participant
	    if string.sub(occupant.nick,-string.len("/focus"))~="/focus" then
		    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 "";
			occupants_json:push({
			    jid = tostring(occupant.nick),
			    email = tostring(email),
			    display_name = tostring(nick)});
		    end
	    end
	end
end

Are the attributes set using setLocalParticipantProperty stored in the occupants objects and can we access them? If possible how?

Thanks.

Those properties are distributed using presence. Not sure how to access the last sent presence stanza by a user though.

1 Like

Here, when user is leaving we get the display name from its last presence jitsi-meet/mod_speakerstats_component.lua at e61ccc956f172e91989d2a785f802ea72974b170 · jitsi/jitsi-meet · GitHub

2 Likes

Hi @damencho @saghul,
Thanks for pointing out valuable information.

But in this case I had an application specific Id and I set the value as the displayName for the MUC, using room.setDisplayName(employeeId). It still didn’t break anything since I don’t use any MUC features. Guess this can be considered as a workaround.

@buddhiv did you find solution for this question ?