Fix max_items and don't let PEP depends on item cache

This commit is contained in:
Christophe Romain 2015-06-18 12:06:29 +02:00
parent 1cf2dfe63a
commit e5a98b100d
2 changed files with 6 additions and 6 deletions

View File

@ -3636,9 +3636,9 @@ max_items(Host, Options) ->
case get_option(Options, persist_items) of
true ->
case get_option(Options, max_items) of
false -> unlimited;
Result when Result < 0 -> 0;
Result -> Result
I when is_integer(I), I < 0 -> 0;
I when is_integer(I) -> I;
_ -> ?MAXITEMS
end;
false ->
case get_option(Options, send_last_published_item) of
@ -3646,8 +3646,8 @@ max_items(Host, Options) ->
0;
_ ->
case is_last_item_cache_enabled(Host) of
true -> 0;
false -> 1
true -> 1;
false -> 0
end
end
end.

View File

@ -62,7 +62,7 @@ options() ->
{notify_delete, false},
{notify_retract, false},
{purge_offline, false},
{persist_items, false},
{persist_items, true},
{max_items, 1},
{subscribe, true},
{access_model, presence},