![]() ?INFO_MSG("mod_stanza_ack a message has been sent to: ~p", ), ?INFO_MSG("mod_stanza_ack a message has been sent coming from: ~p", ), ?INFO_MSG("mod_stanza_ack stopping", ),Įjabberd_hooks:delete(user_send_packet, Host, ?MODULE, on_user_send_packet, 0), ?INFO_MSG("mod_stanza_ack starting", ),Įjabberd_hooks:add(user_send_packet, Host, ?MODULE, on_user_send_packet, 0), I've updated the example, and this compiles and starts correctly with ejabberd 20.07: -module(mod_stanza_ack). Well, that example source code is six years old, and ejabberd development API has changed since then. In call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 249)**.ĭid I miss something? Or using deprecated functions? In call from p1_server:handle_msg/8 (src/p1_server.erl, line 696) In call from xmpp_stream_in:handle_info/2 (src/xmpp_stream_in.erl, line 404) In call from xmpp_stream_in:process_authenticated_packet/2 (src/xmpp_stream_in.erl, line 714) In call from ejabberd_c2s:handle_authenticated_packet/2 (src/ejabberd_c2s.erl, line 484) ![]() In call from ejabberd_hooks:run_fold1/4 (src/ejabberd_hooks.erl, line 217) In function ejabberd_hooks:safe_apply/4 (src/ejabberd_hooks.erl, line 236) ** exception error: undefined function mod_stanza_ack:on_user_send_packet/1 Module works for me but on the server-side, it always crashes with an error **Hook user_send_packet crashed when running mod_stanza_ack:on_user_send_packet/1: Then I start ejabberd server usingĬommand to view logs. I coped mod_stanza_ack.beam file to ejabberd-20.07/lib/ejabberd-20.07/ebin folder where all the module files are present. I create mod_stanza_ack.erl file and compile the file using commandĪnd get mod_stanza_ack.beam file. I try the given code in the link question Ejabberd return message to sender hook / message receipts and added my module in ejabberd.yml file which is in the last line of the above code. See the Jabber SPAM Manifesto for details: # Think twice before enabling registration from any # network (see access_rules section above). # Only accept registration requests from the "trusted" # Avoid buggy clients to make their bookmarks public Uncomment this when you have SQL configured:Īccess_max_user_messages: max_user_offline_messages # For small servers SQLite is a good fit and is very easy ![]() # Mnesia is limited to 2GB, better to use an SQL backend # - "/etc/letsencrypt/live/localhost/privkey.pem"Ĭa_file: "/home/faiqkhan/ejabberd-20.07/conf/cacert.pem" # - "/etc/letsencrypt/live/localhost/fullchain.pem" "/home/faiqkhan/ejabberd-20.07/conf/server.pem" I am using the default ejabberd.yml file which is present in ejabberd-20.07/conf folder. I installed ejabberd on ubuntu from this link.
0 Comments
Leave a Reply. |