我正在尝试从here实现mod_http_offline以便在目标客户端脱机时发送POST请求,但始终会收到以下错误消息:
2018-06-25 11:16:19.202 [错误] <0.542.0> @ejabberd_hooks:safe_apply:383 Hook offline_message_hook在运行mod_http_offline_post:create_message / 1时崩溃: **原因= {错误,undef,[{mod_http_offline_post,create_message,[],[{bounce,{message,<<“ 1529900178124” >>'',chat,<<“ en” >>,{jid,<<“ 10000537_agent “ >>,<<” metachat.release“ >>,<<” 862193039807052“ >>,<<” 10000537_agent“ >>,<<” metachat.release“ >>,<<” 862193039807052“ >>},{ jid,<<“ 10000091_agent” >>,<<“ metachat.release” >>,<< >>,<<“ 10000091_agent” >>,<<“ metachat.release” >>,<< >>},[ ],[{文本,<< >>,<<“ {\”数据\“:{\” contactData \“:[],\”内容\“:\” Asdfg \“},\”类型\“: \“聊天\”}“ >>}],未定义,[{xmlel,<<” request“ >>,[{<<” xmlns“ >>,<<” urn:xmpp:receipts“ >>}]], []}],#{ip => {192,168,100,222}}}}}},{ejabberd_hooks,safe_apply,[{file,“ src / ejabberd_hooks.erl”},{line,380}],4},{ejabberd_hooks, run_fold1,[{file,“ src / ejabberd_hooks.erl”},{line,364}],4},{ejabberd_sm,route,[{file,“ src / ejabberd_sm.erl”},{line,146}], 1},{ejabberd_local,route,[{file,“ src / ejabberd_local.erl”},{line,101}],1},{ejabberd_router,do_route,[{file,“ src / ejabberd_router.erl”},{ line,372}],1},{ejabberd_router,route,[{file,“ src / ejabberd_router.erl”},{line,93}],1},{ejabbe rd_c2s,check_privacy_then_route,[{file,“ src / ejabberd_c2s.erl”},{line,823}],2}]}}
我正在使用18.04,所以也许某些语法已过时,但是由于我是ejabberd和Erlang的新手,所以我找不到问题的根源。请帮忙,任何答案将不胜感激。
答案 0 :(得分:1)
mod_http_offline.erl最近一次修改是在四年前。您在最近的ejabberd中安装了该模块。从那时起ejabberd对钩子的调用发生了很大变化,并且该模块本身不兼容。