You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mod_presence_identity.lua 728B

12345678910111213141516171819202122
  1. local stanza = require "util.stanza";
  2. local update_presence_identity = module:require "util".update_presence_identity;
  3. -- For all received presence messages, if the jitsi_meet_context_(user|group)
  4. -- values are set in the session, then insert them into the presence messages
  5. -- for that session.
  6. function on_message(event)
  7. if event and event["stanza"] then
  8. if event.origin and event.origin.jitsi_meet_context_user then
  9. update_presence_identity(
  10. event.stanza,
  11. event.origin.jitsi_meet_context_user,
  12. event.origin.jitsi_meet_context_group
  13. );
  14. end
  15. end
  16. end
  17. module:hook("pre-presence/bare", on_message);
  18. module:hook("pre-presence/full", on_message);