Problems converting mod_confirm_delivery for new binarized versions of ejabberd

I tried making a module posted at:

https://github.com/johanvorster/ejabberd_confirm_delivery

I am using ejabberd ver 14.07.

The changes I made:

1. Removed all the ?INFO_MSG statements
2. binarised all the strings. Every occurence of "abc" has been replaced by <<"abc">> and so on.

      

What else is required? I was able to compile the module just fine, but it doesn't work.

Inputs? It would be great if anyone on the project branch could update the git project to reflect newer versions of ejabberd.

I intend to receive xmpp lines from every client connected to saya group when they receive a message sent by the server.

thank

+3


source to share


1 answer


I think this module will generate an undef error for the send_packet function inside mod_confirm_delivery.erl. Check your error log:

//var/Journal/ejabberd/ejabberd.log

In this module:

ejabberd_hooks: add (user_send_packet, _Host ,? MODULE, send_packet, 50),



This Hook calls the mod_confirm_delivery: send_packet / 4 function , but your module does not define send_packet / 4. Hence, you need to update your code to match the new signature for hook_ user_send_packet, i.e .:

user_send_packet (package, C2SState, From, To) -> Package

Follow the link: https://docs.ejabberd.im/developer/hooks/

0


source







All Articles