Extract correctly the text from #stanza_error (#1425)

This commit is contained in:
Badlop 2016-12-17 11:45:28 +01:00
parent cc14e223c6
commit 3811a61573
1 changed files with 1 additions and 6 deletions

View File

@ -1264,12 +1264,7 @@ get_error_condition(undefined) ->
"undefined".
get_error_text(Error) ->
case fxml:get_subtag_with_xmlns(Error, <<"text">>, ?NS_STANZAS) of
#xmlel{} = Tag ->
fxml:get_tag_cdata(Tag);
false ->
<<"">>
end.
(Error#stanza_error.text)#text.data.
-spec make_reason(stanza(), jid(), state(), binary()) -> binary().
make_reason(Packet, From, StateData, Reason1) ->