0
我,我已經更新ejabberd從16.01至16.03後,不進行編譯,我有我的模塊有問題,更新之前這行代碼Ejabberd模塊更新
Type = Packet#xmlel.attrs,
io:format("types:~p~n" , [Type]),
%Get raw data of message
Message = xml:element_to_binary(Packet).
工作得很好,現在更新後,產生這種:
types:[{<<"type">>,<<"chat">>}, {<<"to">>,<<"[email protected]frind.it">>},
{<<"from">>,<<"[email protected]">>}]
16:57:13.393 [error]
{undef,
[{xml,element_to_binary,
[{xmlel,<<"message">>,
[{<<"type">>,<<"chat">>},
{<<"to">>,<<"[email protected]">>},
{<<"from">>,<<"[email protected]">>}],
[{xmlel,<<"composing">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/chatstates">>}],
[]}]}], []},
{ejabberd_hooks,safe_apply,3,
[{file,"src/ejabberd_hooks.erl"},{line,382}]},
{ejabberd_hooks,run1,3,
[{file,"src/ejabberd_hooks.erl"},{line,329}]},
{ejabberd_sm,route,3,
[{file,"src/ejabberd_sm.erl"},{line,114}]},
{ejabberd_local,route,3,
[{file,"src/ejabberd_local.erl"},{line,112}]},
{ejabberd_router,route,3,
[{file,"src/ejabberd_router.erl"},{line,77}]},
{ejabberd_c2s,check_privacy_route,5,
[{file,"src/ejabberd_c2s.erl"},{line,2110}]},
{ejabberd_c2s,session_established2,2,
[{file,"src/ejabberd_c2s.erl"},{line,1271}]}]}
running hook:
{offline_message_hook,
[{jid,<<"121">>,<<"node0.frind.it">>,
<<"97395769126380428951460048231139020">>,<<"121">>,
<<"node0.frind.it">>,
<<"97395769126380428951460048231139020">>},
{jid,<<"154">>,<<"node0.frind.it">>,<<>>,<<"154">>,
<<"node0.frind.it">>,<<>>},
{xmlel,<<"message">>,
[{<<"type">>,<<"chat">>},
{<<"to">>,<<"[email protected]">>},
{<<"from">>,<<"[email protected]">>}],
[{xmlel,<<"composing">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/chatstates">>}],[]}]}
]}
任何人都可以幫助我嗎?
看起來像'xml:element_to_binary'不存在,或者它不接受'Packet'作爲它的參數。 – Amiramix