Skip to content

Commit

Permalink
feat: Presence identity module to support other auth mechanisms.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Aug 6, 2024
1 parent b2e06c1 commit 7f38f07
Showing 1 changed file with 11 additions and 4 deletions.
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

0 comments on commit 7f38f07

Please sign in to comment.