Fix type specs
This commit is contained in:
parent
4e5daf4d72
commit
2abca350e0
|
@ -23,8 +23,8 @@
|
||||||
{cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.19"}}},
|
{cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.19"}}},
|
||||||
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.1.1"}}},
|
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.1.1"}}},
|
||||||
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.16"}}},
|
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.16"}}},
|
||||||
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.36"}}},
|
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", "7fd02f3a2f"}},
|
||||||
{xmpp, ".*", {git, "https://github.com/processone/xmpp", "8614cd2b9cacc1429d2b2451e15465bc4703ba11"}},
|
{xmpp, ".*", {git, "https://github.com/processone/xmpp", "63d467e"}},
|
||||||
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.19"}}},
|
{fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.19"}}},
|
||||||
{yconf, ".*", {git, "https://github.com/processone/yconf", "f9c235faf828f52bb01881b172646960d5a8d523"}},
|
{yconf, ".*", {git, "https://github.com/processone/yconf", "f9c235faf828f52bb01881b172646960d5a8d523"}},
|
||||||
{jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
|
{jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}},
|
||||||
|
|
|
@ -385,7 +385,7 @@ process_user(#xmlel{name = <<"user">>, attrs = Attrs, children = Els},
|
||||||
PasswordFormat = ejabberd_auth:password_format(LServer),
|
PasswordFormat = ejabberd_auth:password_format(LServer),
|
||||||
Pass = case PasswordFormat of
|
Pass = case PasswordFormat of
|
||||||
scram ->
|
scram ->
|
||||||
case Password of
|
case Password of
|
||||||
<<"scram:", PassData/binary>> ->
|
<<"scram:", PassData/binary>> ->
|
||||||
parse_scram_password(PassData);
|
parse_scram_password(PassData);
|
||||||
P -> P
|
P -> P
|
||||||
|
@ -520,7 +520,7 @@ process_private(Private, State = #state{user = U, server = S}) ->
|
||||||
stop("Failed to write private: ~p", [Err])
|
stop("Failed to write private: ~p", [Err])
|
||||||
end.
|
end.
|
||||||
|
|
||||||
-spec process_vcard(xmlel(), state()) -> {ok, state()} | {error, _}.
|
-spec process_vcard(xmpp_element(), state()) -> {ok, state()} | {error, _}.
|
||||||
process_vcard(El, State = #state{user = U, server = S}) ->
|
process_vcard(El, State = #state{user = U, server = S}) ->
|
||||||
JID = jid:make(U, S),
|
JID = jid:make(U, S),
|
||||||
IQ = #iq{type = set, id = p1_rand:get_string(),
|
IQ = #iq{type = set, id = p1_rand:get_string(),
|
||||||
|
|
|
@ -565,7 +565,7 @@ process_slot_request(#iq{lang = Lang, from = From} = IQ,
|
||||||
|
|
||||||
-spec create_slot(state(), jid(), binary(), pos_integer(), binary(), binary(),
|
-spec create_slot(state(), jid(), binary(), pos_integer(), binary(), binary(),
|
||||||
binary())
|
binary())
|
||||||
-> {ok, slot()} | {ok, binary(), binary()} | {error, xmlel()}.
|
-> {ok, slot()} | {ok, binary(), binary()} | {error, xmpp_element()}.
|
||||||
create_slot(#state{service_url = undefined, max_size = MaxSize},
|
create_slot(#state{service_url = undefined, max_size = MaxSize},
|
||||||
JID, File, Size, _ContentType, XMLNS, Lang)
|
JID, File, Size, _ContentType, XMLNS, Lang)
|
||||||
when MaxSize /= infinity,
|
when MaxSize /= infinity,
|
||||||
|
|
|
@ -1189,7 +1189,7 @@ authenticate(#connect{password = Pass} = Pkt, IP) ->
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% Validators
|
%%% Validators
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
-spec validate_will(connect(), jid:jid()) -> ok | {error, reason_code()}.
|
-spec validate_will(connect(), jid:jid()) -> ok | {error, error_reason()}.
|
||||||
validate_will(#connect{will = undefined}, _) ->
|
validate_will(#connect{will = undefined}, _) ->
|
||||||
ok;
|
ok;
|
||||||
validate_will(#connect{will = #publish{topic = Topic, payload = Payload},
|
validate_will(#connect{will = #publish{topic = Topic, payload = Payload},
|
||||||
|
|
|
@ -459,7 +459,7 @@ check_h_attribute(#{mgmt_stanzas_out := NumStanzasOut, jid := JID} = State, H) -
|
||||||
[jid:encode(JID), H, NumStanzasOut]),
|
[jid:encode(JID), H, NumStanzasOut]),
|
||||||
mgmt_queue_drop(State, H).
|
mgmt_queue_drop(State, H).
|
||||||
|
|
||||||
-spec update_num_stanzas_in(state(), xmpp_element()) -> state().
|
-spec update_num_stanzas_in(state(), xmpp_element() | xmlel()) -> state().
|
||||||
update_num_stanzas_in(#{mgmt_state := MgmtState,
|
update_num_stanzas_in(#{mgmt_state := MgmtState,
|
||||||
mgmt_stanzas_in := NumStanzasIn} = State, El)
|
mgmt_stanzas_in := NumStanzasIn} = State, El)
|
||||||
when MgmtState == active; MgmtState == pending ->
|
when MgmtState == active; MgmtState == pending ->
|
||||||
|
|
Loading…
Reference in New Issue