processone/ejabberd-contrib

mod_post_log crashing

cC-Xx opened this issue · 2 comments

cC-Xx commented

ejabberd 21.01
latest mod_post_log
nothing is logged

2021-02-05 02:33:42.676 [error] <0.507.0>@ejabberd_hooks:safe_apply:240
 Hook user_send_packet crashed when running mod_post_log:log_user_send/1:
** exception error: no function clause matching 
                 httpc:request(post,
                               {"http://127.0.0.2/messages",
                                [{<<"X-Message-Timestamp">>,
                                  "2021-02-04 23:33:42.673442Z"},
                                 {<<"X-Message-From">>,
                                  "user1@jabber.org/test"},
                                 {<<"X-Message-To">>,"user2@jabber.org"}],
                                <<"text/xml">>,
                                [...

Apparently, the commit 21d78a7 that I made some months ago does in fact break the module.

I've reverted it, tested, and now it doesn't report that error message. But I haven't tested the module functionality itself...

If you can update the modules source code, reinstall and test it, please comment here if this or any other problem appears with that module.

ejabberdctl module_uninstall mod_post_log
ejabberdctl modules_update_specs
ejabberdctl module_install mod_post_log

cC-Xx commented

thanks
not crashing anymore
will try to use it in production