ansible-roles/roles/jitsi/files/prosody/modules/mod_presence_identity.lua

20 lines
681 B
Lua
Raw Normal View History

2024-07-22 23:00:11 +02:00
local stanza = require "util.stanza";
local update_presence_identity = module:require "util".update_presence_identity;
-- For all received presence messages, if the jitsi_meet_context_(user|group)
-- values are set in the session, then insert them into the presence messages
-- for that session.
function on_message(event)
2025-06-16 16:00:13 +02:00
local stanza, session = event.stanza, event.origin;
if stanza and session then
2024-07-22 23:00:11 +02:00
update_presence_identity(
2025-06-16 16:00:13 +02:00
stanza,
session.jitsi_meet_context_user,
session.jitsi_meet_context_group
2024-07-22 23:00:11 +02:00
);
end
end
module:hook("pre-presence/bare", on_message);
module:hook("pre-presence/full", on_message);