Closed jjdp closed 7 years ago
assuming you followed this https://blog.process-one.net/easy-installer-and-structure-for-ejabberd-contributed-modules/ and your setup is correct, you should open ejabberd debug console and try following commands {code} ext_mod:update(). ext_mod:check(mod_offline_post). {code}
note: ejabberd-17.07/.ejabberd-modules is an old path, not absolute... by default (until you tune ejabberdctl) custom modules should be in $HOME/.ejabberd-modules
oh ok good to know, i just assumed since that it was the default path
turns out it was really a permission error after all. uploading used the root user instead of ejabberd
From = element(5,Packet),
To = element(6,Packet),
...
Body = binary_to_list(element(3,lists:nth(1,element(8,Packet)))),
My eyes...
surely there's a better way to parse that?
There is nothing to parse, you should use API functions to work with XMPP packets, see Overview and API. So, for example, you should write:
From = xmpp:get_from(Packet),
To = xmpp:get_to(Packet),
Or, assuming the Packet
is a #message{}
(which is the case):
From = Packet#message.from,
To = Packet#message.to,
Body = binary_to_list(xmpp:get_text(Packet#message.body))
17.07 Ubuntu Server 16.04 LTS in AWS EC2 installed using .deb distribution
Im getting this beam error when i module_check, any idea why is that? There are also no ebin directories in https://github.com/processone/ejabberd-contrib
ejabberd-17.07/.ejabberd-modules/sources/ejabberd-contrib/mod_offline_post/ebin/mod_offline_post.bea#: error writing file: no such file or directory
I also tried the hello world from the website. no dice, still the same error
the mod_offline_post: