diff --git a/mod_rest/src/mod_rest.erl b/mod_rest/src/mod_rest.erl index 1a9c2bc..4a4ccf9 100644 --- a/mod_rest/src/mod_rest.erl +++ b/mod_rest/src/mod_rest.erl @@ -64,7 +64,7 @@ process(Path, Request) -> %% Otherwise, it is considered an ejabberd command to execute. maybe_post_request([$< | _ ] = Data, Host, ClientIp) -> try - Stanza = xml_stream:parse_element(Data), + 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)), allowed = check_stanza(Stanza, From, To, Host),