]> granicus.if.org Git - ejabberd/commitdiff
Extract correctly the text from #stanza_error (#1425)
authorBadlop <badlop@process-one.net>
Sat, 17 Dec 2016 10:45:28 +0000 (11:45 +0100)
committerBadlop <badlop@process-one.net>
Sat, 17 Dec 2016 10:46:16 +0000 (11:46 +0100)
src/mod_muc_room.erl

index 07689db1977b8f78ef24b2faae714a06719f69df..a172bd38c016f840e70a3e008cb6fec9abcff22c 100644 (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) ->