ejabberd-hooks

How to resolve undef error in ejabberd hook

雨燕双飞 提交于 2019-12-24 14:52:54
问题 I have added a customized module named mod_confirm_delivery in ejabberd which has compiled and added successfully but when i am sending a message an error is coming in my ejabberd error log file, That is: 2016-03-15 17:03:38.306 [error] <0.2653.0>@ejabberd_hooks:run_fold1:368 {undef,[{mod_confirm_delivery,send_packet,[{xmlel,<<"iq">>,[{<<"xml:lang">>,<<"en">>},{<<"type">>,<<"get">>},{<<"id">>,<<"aacfa">>}],[{xmlcdata,<<"\n">>},{xmlel,<<"query">>,[{<<"xmlns">>,<<"jabber:iq:roster">>}],[]},

mod_zeropush not working with ejabberd 16.03

戏子无情 提交于 2019-12-12 02:18:38
问题 I am working with mod_zeropush and i was working fine with 15.07 until i switched to the ejabberd version 16.03. I am using Ubuntu OS 14.04 Copied all beam files again to ebin directory it iis last error === 2016-05-12 15:40:08.706 [error] <0.499.0>@ejabberd_hooks:run1:332 {undef,[{xml,get_tag_attr_s,[<<"type">>,{xmlel,<<"message">>,[{<<"type">>, <<"chat">>},{<<"image">>,<<"http://example.com/web-services/user_images /personal_image/support_team_01.03.2016.png">>},{<<"id">>, <<

Module to handle custom iq stanzas does not work with ejabberd-18.09

倾然丶 夕夏残阳落幕 提交于 2019-12-11 19:06:35
问题 I am trying to move to ejabberd-18.09 from ejabberd-17.03. I have this module so that I can send custom iq stanzas to ejabberd. -module(mod_test_custom). %% ==================================================================== %% API functions %% ==================================================================== -export([start/2, stop/1, process_local_iq/3,depends/2,mod_opt_type/1]). -include("ejabberd.hrl"). -include("logger.hrl"). -include("xmpp.hrl"). %% ==================================

How do I append custom data in the body of a xmpp message in ejabberd

偶尔善良 提交于 2019-12-11 17:56:11
问题 I have set up a chat settong using Pidgin and Ejabberd.I have written down a custom module in ejabberd using user_send_packet : ejabberd_hooks:add(user_send_packet, _Host, ?MODULE, myMessage, 95), The function myMessage is as follows: myMessage({Packet, C2SState})-> PacketType=xmpp:get_name(Packet), case PacketType of <<"iq">>-> ok; <<"presence">>-> ok; <<"message">>-> Sum=2+2, ?INFO_MSG("Sum is ~p~n",[Sum]) end, {Packet,C2SState}. Basically what this function does is that whenever someone