Can you share how you are using that in the module?
get_presence() is a method on occupant object which you can get from the event.
Perhaps something like this? (Note: I have not run the code so may have issues. But hopefully it gives you a starting point)
In the code above, I changed EventData:on_occupant_joined
and EventData:on_occupant_leave
to take the occupant object as input rather than occupant_jid, and using that we can call occupant:get_presence():get_child_text('nick', 'http://jabber.org/protocol/nick');
Now the log shows
startup warn Attempt to read a non-existent global ‘occupant’
stack traceback:
…
/jitsi-meet/prosody-plugins/mod_event_sync_component.lua:145: attempt to index local ‘occupant’ (a nil value)
I’ve updated the code. Try again.
Thanks a lot . The code is working fine.