bit_by_bit
bit_by_bit

Reputation: 337

Issues in converting the mod_confirm_delivery module for newer binarized ejabberd versions

I have tried making a module hosted at :

https://github.com/johanvorster/ejabberd_confirm_delivery

I am using ejabberd ver 14.07.

The changes i did:

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 have been able to compile the module just fine however it doesn't work.

Inputs? Would be great if anybody on the project branch could update the git project as per the newer versions of ejabberd.

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

Thanks

Upvotes: 2

Views: 138

Answers (1)

Hemant Sharma
Hemant Sharma

Reputation: 534

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

//var/log/ejabberd/ejabberd.log

In this module:

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

This Hook is calling mod_confirm_delivery:send_packet/4 function but in your module send_packet/4 is not define. Hence You have to update the code to match new signature for user_send_packet hook, that is:

user_send_packet(Packet, C2SState, From, To) -> Packet

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

Upvotes: 0

Related Questions