mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Reflect changes in the xmpp lib
This commit is contained in:
parent
152e0d77c1
commit
1bb2bae62b
@ -25,7 +25,7 @@
|
|||||||
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.16"}}},
|
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.16"}}},
|
||||||
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.10"}}},
|
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.10"}}},
|
||||||
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.24"}}},
|
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.24"}}},
|
||||||
{xmpp, ".*", {git, "https://github.com/processone/xmpp", {tag, "1.1.15"}}},
|
{xmpp, ".*", {git, "https://github.com/processone/xmpp", "d551ba9"}},
|
||||||
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.11"}}},
|
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.11"}}},
|
||||||
{jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
|
{jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
|
||||||
{p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.2"}}},
|
{p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.2"}}},
|
||||||
|
@ -1241,7 +1241,7 @@ get_error_condition(undefined) ->
|
|||||||
|
|
||||||
-spec get_error_text(stanza_error()) -> binary().
|
-spec get_error_text(stanza_error()) -> binary().
|
||||||
get_error_text(#stanza_error{text = Txt}) ->
|
get_error_text(#stanza_error{text = Txt}) ->
|
||||||
xmpp:get_text([Txt]).
|
xmpp:get_text(Txt).
|
||||||
|
|
||||||
-spec make_reason(stanza(), jid(), state(), binary()) -> binary().
|
-spec make_reason(stanza(), jid(), state(), binary()) -> binary().
|
||||||
make_reason(Packet, From, StateData, Reason1) ->
|
make_reason(Packet, From, StateData, Reason1) ->
|
||||||
|
@ -353,9 +353,9 @@ format_stanza_error(#stanza_error{reason = Reason, text = Txt}) ->
|
|||||||
#redirect{} -> <<"redirect">>;
|
#redirect{} -> <<"redirect">>;
|
||||||
_ -> erlang:atom_to_binary(Reason, latin1)
|
_ -> erlang:atom_to_binary(Reason, latin1)
|
||||||
end,
|
end,
|
||||||
case Txt of
|
case xmpp:get_text(Txt) of
|
||||||
undefined -> Slogan;
|
<<"">> ->
|
||||||
#text{data = <<"">>} -> Slogan;
|
Slogan;
|
||||||
#text{data = Data} ->
|
Data ->
|
||||||
<<Data/binary, " (", Slogan/binary, ")">>
|
<<Data/binary, " (", Slogan/binary, ")">>
|
||||||
end.
|
end.
|
||||||
|
@ -1117,17 +1117,17 @@ format_inet_error(Reason) ->
|
|||||||
Txt -> Txt
|
Txt -> Txt
|
||||||
end.
|
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) ->
|
format_stream_error(Reason, Txt) ->
|
||||||
Slogan = case Reason of
|
Slogan = case Reason of
|
||||||
undefined -> "no reason";
|
undefined -> "no reason";
|
||||||
#'see-other-host'{} -> "see-other-host";
|
#'see-other-host'{} -> "see-other-host";
|
||||||
_ -> atom_to_list(Reason)
|
_ -> atom_to_list(Reason)
|
||||||
end,
|
end,
|
||||||
case Txt of
|
case xmpp:get_text(Txt) of
|
||||||
undefined -> Slogan;
|
<<"">> ->
|
||||||
#text{data = <<"">>} -> Slogan;
|
Slogan;
|
||||||
#text{data = Data} ->
|
Data ->
|
||||||
binary_to_list(Data) ++ " (" ++ Slogan ++ ")"
|
binary_to_list(Data) ++ " (" ++ Slogan ++ ")"
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -796,17 +796,17 @@ format_inet_error(Reason) ->
|
|||||||
Txt -> Txt
|
Txt -> Txt
|
||||||
end.
|
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) ->
|
format_stream_error(Reason, Txt) ->
|
||||||
Slogan = case Reason of
|
Slogan = case Reason of
|
||||||
undefined -> "no reason";
|
undefined -> "no reason";
|
||||||
#'see-other-host'{} -> "see-other-host";
|
#'see-other-host'{} -> "see-other-host";
|
||||||
_ -> atom_to_list(Reason)
|
_ -> atom_to_list(Reason)
|
||||||
end,
|
end,
|
||||||
case Txt of
|
case xmpp:get_text(Txt) of
|
||||||
undefined -> Slogan;
|
<<"">> ->
|
||||||
#text{data = <<"">>} -> Slogan;
|
Slogan;
|
||||||
#text{data = Data} ->
|
Data ->
|
||||||
binary_to_list(Data) ++ " (" ++ Slogan ++ ")"
|
binary_to_list(Data) ++ " (" ++ Slogan ++ ")"
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user