Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(prosody): Updates checks in presence_identity avoids setting missing user.
damenchodc908512f977
diff --git a/resources/prosody-plugins/mod_presence_identity.lua b/resources/prosody-plugins/mod_presence_identity.luaindex 4db397e841..44d863439a 100644--- a/resources/prosody-plugins/mod_presence_identity.lua+++ b/resources/prosody-plugins/mod_presence_identity.lua@@ -5,16 +5,13 @@ local update_presence_identity = module:require "util".update_presence_identity;-- values are set in the session, then insert them into the presence messages-- for that session.function on_message(event)- if event and event["stanza"] then- if event.origin and event.origin.jitsi_meet_context_user then-+ local stanza, session = event.stanza, event.origin;+ if stanza and session thenupdate_presence_identity(- event.stanza,- event.origin.jitsi_meet_context_user,- event.origin.jitsi_meet_context_group+ stanza,+ session.jitsi_meet_context_user,+ session.jitsi_meet_context_group);-- endendenddiff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.luaindex e6bf7022da..e37bc2459e 100644--- a/resources/prosody-plugins/util.lib.lua+++ b/resources/prosody-plugins/util.lib.lua@@ -208,8 +208,7 @@ end-- @param creator_group the group of the user who created the user which-- presence we are updating (this is the poltergeist case, where a user creates-- a poltergeist), optional.-function update_presence_identity(- stanza, user, group, creator_user, creator_group)+function update_presence_identity(stanza, user, group, creator_user, creator_group)-- First remove any 'identity' element if it already-- exists, so it cannot be spoofed by a client@@ -222,7 +221,11 @@ function update_presence_identity(endreturn tagend- )+ );++ if not user then+ return;+ endstanza:tag("identity"):tag("user");for k, v in pairs(user) do