Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Presence identity module to support other auth mechanisms. #14981

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions resources/prosody-plugins/mod_presence_identity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ local update_presence_identity = module:require "util".update_presence_identity;
-- for that session.
function on_message(event)
if event and event["stanza"] then
if event.origin and event.origin.jitsi_meet_context_user then
if event.origin then
local user;
local group;
if event.origin.jitsi_meet_context_user then
user = event.origin.jitsi_meet_context_user;
group = event.origin.jitsi_meet_context_group;
else
user = { id = event.origin.username }; -- when using auth similar to internal_hashed
end

update_presence_identity(
event.stanza,
event.origin.jitsi_meet_context_user,
event.origin.jitsi_meet_context_group
user,
group
);

end
end
end
Expand Down