mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Fix max_items and don't let PEP depends on item cache
This commit is contained in:
parent
1cf2dfe63a
commit
e5a98b100d
@ -3636,9 +3636,9 @@ max_items(Host, Options) ->
|
|||||||
case get_option(Options, persist_items) of
|
case get_option(Options, persist_items) of
|
||||||
true ->
|
true ->
|
||||||
case get_option(Options, max_items) of
|
case get_option(Options, max_items) of
|
||||||
false -> unlimited;
|
I when is_integer(I), I < 0 -> 0;
|
||||||
Result when Result < 0 -> 0;
|
I when is_integer(I) -> I;
|
||||||
Result -> Result
|
_ -> ?MAXITEMS
|
||||||
end;
|
end;
|
||||||
false ->
|
false ->
|
||||||
case get_option(Options, send_last_published_item) of
|
case get_option(Options, send_last_published_item) of
|
||||||
@ -3646,8 +3646,8 @@ max_items(Host, Options) ->
|
|||||||
0;
|
0;
|
||||||
_ ->
|
_ ->
|
||||||
case is_last_item_cache_enabled(Host) of
|
case is_last_item_cache_enabled(Host) of
|
||||||
true -> 0;
|
true -> 1;
|
||||||
false -> 1
|
false -> 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end.
|
end.
|
||||||
|
@ -62,7 +62,7 @@ options() ->
|
|||||||
{notify_delete, false},
|
{notify_delete, false},
|
||||||
{notify_retract, false},
|
{notify_retract, false},
|
||||||
{purge_offline, false},
|
{purge_offline, false},
|
||||||
{persist_items, false},
|
{persist_items, true},
|
||||||
{max_items, 1},
|
{max_items, 1},
|
||||||
{subscribe, true},
|
{subscribe, true},
|
||||||
{access_model, presence},
|
{access_model, presence},
|
||||||
|
Loading…
Reference in New Issue
Block a user