Files
upstream-jitsi-meet/resources/prosody-plugins/mod_presence_identity.lua
upstream-mirror 1d2bfcac0c
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s
snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
2026-09-15 15:56:32 +05:00

20 lines
681 B
Lua

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)
local stanza, session = event.stanza, event.origin;
if stanza and session then
update_presence_identity(
stanza,
session.jitsi_meet_context_user,
session.jitsi_meet_context_group
);
end
end
module:hook("pre-presence/bare", on_message);
module:hook("pre-presence/full", on_message);