hi, I using ejabberd 16.02. it returns this error after adds assume_mam_usage: if_enabled to mam config:
mod_mam:
assume_mam_usage: if_enabled
default: always
cache_size: 100000
cache_life_time: 3600
how to fix it?
2016-06-12 11:58:51.539 [error] <0.20724.1>@ejabberd_hooks:run_fold1:368 {{case_clause,{archive_prefs,{<<"user1">>,<<"domain.com">>},always,[],[]}},[{mod_mam,message_is_archived,5,[{file,"src/mod_mam.erl"},{line,354}]},{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_unacked_stanzas/1-fun-6-',8,[{file,"src/ejabberd_c2s.erl"},{line,2918}]},{lists,foreach,2,[{file,"lists.erl"},{line,1336}]},{ejabberd_c2s,terminate,3,[{file,"src/ejabberd_c2s.erl"},{line,1803}]},{p1_fsm,terminate,8,[{file,"src/p1_fsm.erl"},{line,740}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
running hook: {message_is_archived,[{state,{socket_state,ezlib,{zlibsock,fast_tls,{tlssock,#Port<0.47476>,#Port<0.47495>},#Port<0.47539>},<0.20723.1>},ejabberd_socket,#Ref<0.0.4.219723>,false,<<"17644652947291914606">>,undefined,c2s,c2s_shaper,true,true,false,true,[verify_none,compression_none,{protocol_options,<<"no_sslv3">>},{certfile,<<"/opt/ejabberd-16.02/conf/server.pem">>}],true,{jid,<<"user">>,<<"domain.com">>,<<"Android_bc7104214a409f89">>,<<"user">>,<<"domain.com">>,<<"Android_bc7104214a409f89">>},<<"user">>,<<"domain.com">>,<<"Android_bc7104214a409f89">>,{{1465,715862,453492},<0.20724.1>},{23,{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user1">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user2">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil}}},{{<<"user3">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user4">>,<<"domain.com">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user5">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil}}}}},{41,{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user6">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user7">>,<<"domain.com">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user8">>,<<"domain.com">>,<<>>},nil,nil}}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user9">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user10">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil}}}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user11">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user12">>,<<"domain.com">>,<<>>},nil,nil},nil}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},nil,nil},nil},{{<<"user13">>,<<"domain.com">>,<<>>},nil,nil}}},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user">>,<<"domain.com">>,<<>>},{{<<"user...">>,...},...},...},...}}}},...},...]}
There was a recent fix
There was a recent fix related to that code, so maybe it got fixed already:https://github.com/processone/ejabberd/commit/26bce5dee326dbd7b02a1fdc8e...