Virendra Varma
Virendra Varma

Reputation: 935

Unable to find xmpp.hrl and ejabberd.hrl in ejabberd-19.02

I am new with Ejabberd and Erlang and I am trying to add this module. I made the changes like I replace the jlib.hrl with xmpp.hrl and replace the packet by the message as suggested in this answer my issue is whenever I am trying to compile it say xmpp.hrl and ejabberd.hrl is not found how can I solve this issue.

I want to send the FCM notification to the offline user if some trying to send a message to him. am I doing right? or there have some other best ways to achieve this

Upvotes: 0

Views: 442

Answers (1)

Badlop
Badlop

Reputation: 4120

ejabberd.hrl was removed a year ago: https://github.com/processone/ejabberd/commit/fd8e07af4789be362a61755ea47f216baeb64989

Download ejabberd source code, copy mod_offline_post.erl to the src/ dir, and make your changes, including those two:

diff --git a/src/mod_offline_post.erl b/src/mod_offline_post.erl
index 312278dc0..f4e6f79a1 100644
--- a/src/mod_offline_post.erl
+++ b/src/mod_offline_post.erl
@@ -13,8 +13,7 @@

 -define(PROCNAME, ?MODULE).

--include("ejabberd.hrl").
--include("jlib.hrl").
+-include("xmpp.hrl").
 -include("logger.hrl").
 -include("mod_muc_room.hrl").

Then compile and install ejabberd.

Upvotes: 2

Related Questions