summaryrefslogtreecommitdiff
path: root/src/xmpp_stream_in.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-10-13 20:48:21 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2017-10-13 20:48:21 +0300
commit1bb2bae62b446f279182d4474076b97e887b1f49 (patch)
tree8085857f2766b456c7baa01ac6151bc5cc6207e9 /src/xmpp_stream_in.erl
parentSend presence-unavailable when expulsing a participant (diff)
Reflect changes in the xmpp lib
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 d9be3d4f..329ebad6 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.