erlang - Making an HTTP GET request from ejabberd mod_register -
i have setup ejabberd server. when user registers need make request server notify of user registration. url is:
http://localhost:2555/registration?reg=true&id=xyz
how make request within mod_register module in ejabberd config file? mod_register follows:
{mod_register, [ {welcome_message, {"welcome!", "welcome jabber server."}}, {access, register} //get request ]}
i guess looking solution involving programming in erlang.
you can patch ejabberd's mod_register directly @ point registration successful. see example
send_registration_notifications/2
. quick , dirty, not work accross ejabberd upgrades.you can configure ejabberd's mod_register send registration notifications option
registration_watchers
bot, , design such xmpp bot access url whenever receives these notifications. use exmpp starting point. provide tutorial write bot.
to access url erlang, easiest use built-in http client, , in particular httpc:request/1
.
Comments
Post a Comment