I have hook handler in my code:
ejabberd_hooks:add(sm_register_connection_hook, "localhost", ?MODULE, on_register, 80),
on_register(SID, JID, INFO) ->
{_, _, _, _, Name, _, _} = JID,
ok.
For example i want to send this Name to gen_server, how can i send message to gen_server for example from this hook with Name? How can i know gen_server's pid inside on_register?
Thank you.