From c5daf563851d018326abfbb706949571303754ec Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 8 Mar 2016 00:35:30 +0100 Subject: [PATCH] Update mod_rest to work with ejabberd 16.02 --- mod_rest/src/mod_rest.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index 382c596..b82b7b5 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -64,9 +64,9 @@ process(Path, Request) -> %% Otherwise, it is considered an ejabberd command to execute. maybe_post_request(<<$<,_/binary>> = Data, Host, ClientIp) -> try - Stanza = {xmlel, _, _, _} = xml_stream:parse_element(Data), - From = jlib:string_to_jid(xml:get_tag_attr_s(<<"from">>, Stanza)), - To = jlib:string_to_jid(xml:get_tag_attr_s(<<"to">>, Stanza)), + Stanza = {xmlel, _, _, _} = fxml_stream:parse_element(Data), + From = jlib:string_to_jid(fxml:get_tag_attr_s(<<"from">>, Stanza)), + To = jlib:string_to_jid(fxml:get_tag_attr_s(<<"to">>, Stanza)), allowed = check_stanza(Stanza, From, To, Host), ?INFO_MSG("Got valid request from ~s~nwith IP ~p~nto ~s:~n~p", [jlib:jid_to_string(From),