任何人都可以请帮助 ejabberd 设置偏好的 rest api
以下是请求正文
{
"user": "venkat",
"host": "localhost",
"resource": "tka1",
"type": "available",
"show": "away",
"status": "",
"priority": "0"
}
当我试图点击 api 时,我得到的响应是“internal_error”。
在日志中,我可以看到以下语句
REST API 错误:set_presence([{<<"user">>,<<"venkat">>}, {<<"host">>,<<"localhost">>}, {<<"resource"> >,<<"tka1">>}, {<<"type">>,<<"available">>}, {<<"show">>,<<"away">>}, {<< "状态">>,<<>>},{<<"优先级">>,<<"0">>}])
-> 退出:{noproc,{p1_server,call,[none, {set_presence,{presence,<<>>,available,<<>>, {jid,<<"venkat">>,<<"localhost"> >,<<"tka1">>,<<"venkat">>,<<"localhost">>,<<"tka1">>}, {jid,<<"venkat">>,<<"localhost ">>,<<>>,<<"venkat">>,<<"localhost">>,<<>>},away,[],0,[],#{}}},1000]} }
[{p1_server,call,3,[{file,"src/p1_server.erl"},{line,210}]},{mod_http_api,handle2,4,[{file,"src/mod_http_api.erl"},{ line,268}]},{mod_http_api,handle,4,[{file,"src/mod_http_api.erl"},{line,229}]},{mod_http_api,perform_call,4,[{file,"src/mod_http_api .erl"},{line,189}]},{mod_http_api,process,2,[{file,"src/mod_http_api.erl"},{line,142}]},{ejabberd_http,process,2,[{文件,"src/ejabberd_http.erl"},{line,373}]},{ejabberd_http,process_request,1,[{file,"src/ejabberd_http.erl"},{line,496}]},{ejabberd_http, process_header,2,[{file,"src/ejabberd_http.erl"},{line,293}]}]
使用 ejabberd 20.07 版本