mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Fix dialyzer warnings for mod_mam
This commit is contained in:
parent
e987b88848
commit
151668ac10
@ -4,7 +4,7 @@
|
||||
timestamp = p1_time_compat:timestamp() :: erlang:timestamp() | '_' | '$1',
|
||||
peer = {<<"">>, <<"">>, <<"">>} :: ljid() | '_' | '$3' | undefined,
|
||||
bare_peer = {<<"">>, <<"">>, <<"">>} :: ljid() | '_' | '$3',
|
||||
packet = #xmlel{} :: xmlel() | '_',
|
||||
packet = #xmlel{} :: xmlel() | message() | '_',
|
||||
nick = <<"">> :: binary(),
|
||||
type = chat :: chat | groupchat}).
|
||||
|
||||
|
@ -945,7 +945,7 @@ filter_by_max(Msgs, Len) when is_integer(Len), Len >= 0 ->
|
||||
filter_by_max(_Msgs, _Junk) ->
|
||||
{[], true}.
|
||||
|
||||
-spec limit_max(rsm_set(), binary()) -> rsm_set().
|
||||
-spec limit_max(rsm_set(), binary()) -> rsm_set() | undefined.
|
||||
limit_max(RSM, ?NS_MAM_TMP) ->
|
||||
RSM; % XEP-0313 v0.2 doesn't require clients to support RSM.
|
||||
limit_max(#rsm_set{max = Max} = RSM, _NS) when not is_integer(Max) ->
|
||||
|
@ -217,13 +217,10 @@ make_sql_query(User, LServer,
|
||||
true ->
|
||||
[]
|
||||
end,
|
||||
WithTextClause = case WithText of
|
||||
{text, <<>>} ->
|
||||
[];
|
||||
{text, Txt} ->
|
||||
WithTextClause = if is_binary(WithText), WithText /= <<>> ->
|
||||
[<<" and match (txt) against ('">>,
|
||||
Escape(Txt), <<"')">>];
|
||||
undefined ->
|
||||
Escape(WithText), <<"')">>];
|
||||
true ->
|
||||
[]
|
||||
end,
|
||||
WithClause = case catch jid:tolower(With) of
|
||||
|
Loading…
Reference in New Issue
Block a user