archive message from specific users

Hi
I don't want to archive messages from specific user(jaber) with mam modules. I change line 451 of mod_mam.erl.

store(Pkt, LServer, {LUser, LHost}, Type, Peer, Nick, _Dir, odbc) when LUser =/= <<"jabber">>  ->

It is working, but it returns this error when send messages to/from jabber user

2016-03-05 18:11:01.631 [error] <0.478.0>@ejabberd_hooks:run_fold1:368 {undef,[{p1_logger,debug_msg,[mod_mam,755,"Additional recipient of message to bare JID: ~s@~s/~s",[<<"user1">>,<<"example.com">>,<<"Gajim">>]],[]},{mod_mam,is_bare_copy,2,[{file,"mod_mam.erl"},{line,755}]},{mod_mam,user_receive_packet,5,[{file,"mod_mam.erl"},{line,163}]},{ejabberd_hooks,safe_apply,3,[{file,"src/ejabberd_hooks.erl"},{line,382}]},{ejabberd_hooks,run_fold1,4,[{file,"src/ejabberd_hooks.erl"},{line,365}]},{ejabberd_c2s,handle_info,3,[{file,"src/ejabberd_c2s.erl"},{line,1667}]},{p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
running hook: {user_receive_packet,[{state,{socket_state,p1_tls,{tlssock,#Port<0.4416>,#Port<0.4417>},<0.477.0>},ejabberd_socket,#Ref<0.0.0.10859>,false,<<"3544979526">>,undefined,c2s,c2s_shaper,false,true,false,true,[verify_none,compression_none,{protocol_options,<<"no_sslv3">>},{certfile,<<"/opt/ejabberd-15.11/conf/server.pem">>}],true,{jid,<<"user1">>,<<"example.com">>,<<"Gajim">>,<<"user1">>,<<"example.com">>,<<"Gajim">>},<<"user1">>,<<"example.com">>,<<"Gajim">>,{{1457,188859,963886},<0.478.0>},{2,{{<<"user2">>,<<"example.com">>,<<>>},{{<<"user1">>,<<"example.com">>,<<>>},nil,nil},nil}},{1,{{<<"user1">>,<<"example.com">>,<<>>},nil,nil}},{0,nil},undefined,undefined,{userlist,none,[],false},c2s_tls,undefined,{{192,168,1,81},39874},[],active,[],active,<<"urn:xmpp:sm:2">>,{[{7,{1457,188861,560204},{xmlel,<<"iq">>,[{<<"from">>,<<"user1@example.com">>},{<<"to">>,<<"user1@example.com/Gajim">>},{<<"id">>,<<"356">>},{<<"type">>,<<"error">>}],[{xmlel,<<"query">>,[{<<"xmlns">>,<<"jabber:iq:privacy">>}],[{xmlel,<<"list">>,[{<<"name">>,<<"block">>}],[]}]},{xmlel,<<"error">>,[{<<"code">>,<<"404">>},{<<"type">>,<<"cancel">>}],[{xmlel,<<"item-not-found">>,[{<<"xmlns">>,<<"urn:ietf:params:xml:ns:xmpp-stanzas">>}],[]}]}]}}],[]},1000,undefined,300000,300,false,8,7,<<"en">>},{jid,<<"user1">>,<<"example.com">>,<<"Gajim">>,<<"user1">>,<<"example.com">>,<<"Gajim">>},{jid,<<"user1">>,<<"example.com">>,<<>>,<<"user1">>,<<"example.com">>,<<>>},{jid,<<"user1">>,<<"example.com">>,<<"Gajim">>,<<"user1">>,<<"example.com">>,<<"Gajim">>}]}
2016-03-05 18:11:01.870 [error] <0.478.0>@ejabberd_hooks:run_fold1:368 {undef,[{p1_logger,debug_msg,[mod_mam,755,"Additional recipient of message to bare JID: ~s@~s/~s",[<<"user1">>,<<"example.com">>,<<"Gajim">>]],[]},{mod_mam,is_bare_copy,2,[{file,"mod_mam.erl"},{line,755}]},{mod_mam,user_receive_packet,5,[{file,"mod_mam.erl"},{line,163}]},{ejabberd_hooks,safe_apply,3,[{file,"src/ejabberd_hooks.erl"},{line,382}]},{ejabberd_hooks,run_fold1,4,[{file,"src/ejabberd_hooks.erl"},{line,365}]},{ejabberd_c2s,handle_info,3,[{file,"src/ejabberd_c2s.erl"},{line,1667}]},{p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
running hook: {user_receive_packet,[{state,{socket_state,p1_tls,{tlssock,#Port<0.4416>,#Port<0.4417>},<0.477.0>},ejabberd_socket,#Ref<0.0.0.10859>,false,<<"3544979526">>,undefined,c2s,c2s_shaper,false,true,false,true,[verify_none,compression_none,{protocol_options,<<"no_sslv3">>},{certfile,<<"/opt/ejabberd-15.11/conf/server.pem">>}],true,{jid,<<"user1">>,<<"example.com">>,<<"Gajim">>,<<"user1">>,<<"example.com">>,<<"Gajim">>},<<"user1">>,<<"example.com">>,<<"Gajim">>,{{1457,188859,963886},<0.478.0>},{2,{{<<"user2">>,<<"example.com">>,<<>>},{{<<"user1">>,<<"example.com">>,<<>>},nil,nil},nil}},{1,{{<<"user1">>,<<"example.com">>,<<>>},nil,nil}},{0,nil},undefined,undefined,{userlist,none,[],false},c2s_tls,undefined,{{192,168,1,81},39874},[],active,[],active,<<"urn:xmpp:sm:2">>,{[],[]},1000,undefined,300000,300,false,9,8,<<"en">>},{jid,<<"user1">>,<<"example.com">>,<<"Gajim">>,<<"user1">>,<<"example.com">>,<<"Gajim">>},{jid,<<"user1">>,<<"example.com">>,<<>>,<<"user1">>,<<"example.com">>,<<>>},{jid,<<"user1">>,<<"example.com">>,<<"Gajim">>,<<"user1">>,<<"example.com">>,<<"Gajim">>}]}
2016-03-05 18:11:02.064 [error] <0.478.0>@ejabberd_hooks:run_fold1:368 {undef,[{p1_logger,debug_msg,[mod_mam,755,"Additional recipient of message to bare JID: ~s@~s/~s",[<<"user1">>,<<"example.com">>,<<"Gajim">>]],[]},{mod_mam,is_bare_copy,2,[{file,"mod_mam.erl"},{line,755}]},{mod_mam,user_receive_packet,5,[{file,"mod_mam.erl"},{line,163}]},{ejabberd_hooks,safe_apply,3,[{file,"src/ejabberd_hooks.erl"},{line,382}]},{ejabberd_hooks,run_fold1,4,[{file,"src/ejabberd_hooks.erl"},{line,365}]},{ejabberd_c2s,handle_info,3,[{file,"src/ejabberd_c2s.erl"},{line,1667}]},{p1_fsm,handle_msg,10,[{file,"src/p1_fsm.erl"},{line,582}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}

how to fix it?

{undef,[{p1_logger,debug_msg

{undef,[{p1_logger,debug_msg

The problem is that recent ejabebrd versions can use two different modules for logging, one of them was used for compiling your ejabberd, but you used the other one for compiling the module.

Since ejabberd 16.02, only one logging module is used, so you should have this problem.

What ejabberd version are you using?

Thank you so much for your

Thank you so much for your kind response.
I test in 15.11 and 16.02. I using linux-x86_64-installer.run.
I change mod_mam.erl in ejabberd.tgz and complie it. then replace mod_mam.beam in /opt/ejabberd/lib/ejabberd/ebin.

Syndicate content