I am new to ejabberd, trying to add new module for offline_message_posturl, on a Windows server. I couldn't find any blog post specifically for Windows other than the below. I am using ejabberd version 15.07.
I have been following this blog post: http://jasonrowe.com/2011/12/30/ejabberd-offline-messages/
Right now I am not able to create a .beam
file from the module file. I get this error:
> c(mod_http_offline).
mod_http_offline.erl:21: undefined macro 'INFO_MSG/2'
mod_http_offline.erl:27: undefined macro 'INFO_MSG/2'
mod_http_offline.erl:44: undefined macro 'INFO_MSG/2'
mod_http_offline.erl:11: function start/2 undefined
mod_http_offline.erl:11: function stop/1 undefined
mod_http_offline.erl:38: function post_offline_message/3 undefined
error
How can I fix this error?
The INFO_MSG
macro used to be defined in the header file ejabberd.hrl
, but it was moved to logger.hrl
in ejabberd 13.06, which was released after that blog post was written. Include logger.hrl
as well as ejabberd.hrl
, and your file should compile:
-include("ejabberd.hrl").
-include("logger.hrl").