aboutsummaryrefslogtreecommitdiff
path: root/src/xmpp_stream_in.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp_stream_in.erl')
-rw-r--r--src/xmpp_stream_in.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xmpp_stream_in.erl b/src/xmpp_stream_in.erl
index d9be3d4f7..329ebad61 100644
--- a/src/xmpp_stream_in.erl
+++ b/src/xmpp_stream_in.erl
@@ -1117,17 +1117,17 @@ format_inet_error(Reason) ->
Txt -> Txt
end.
--spec format_stream_error(atom() | 'see-other-host'(), undefined | text()) -> string().
+-spec format_stream_error(atom() | 'see-other-host'(), [text()]) -> string().
format_stream_error(Reason, Txt) ->
Slogan = case Reason of
undefined -> "no reason";
#'see-other-host'{} -> "see-other-host";
_ -> atom_to_list(Reason)
end,
- case Txt of
- undefined -> Slogan;
- #text{data = <<"">>} -> Slogan;
- #text{data = Data} ->
+ case xmpp:get_text(Txt) of
+ <<"">> ->
+ Slogan;
+ Data ->
binary_to_list(Data) ++ " (" ++ Slogan ++ ")"
end.