mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
mod_pubsub: Fix get_max_items_node/1 specification
Make it explicit that the get_max_items_node/1 function returns ?MAXITEMS if the 'max_items_node' option isn't specified. The function didn't actually fall back to 'undefined' (but to the 'max_items_node' default; i.e., ?MAXITEMS) anyway. This change just clarifies the behavior and adjusts the function specification accordingly.
This commit is contained in:
parent
29dcc9b94c
commit
2f1611f918
@ -3579,9 +3579,9 @@ check_opt_range(Opt, Opts, Max) ->
|
||||
Val -> Val =< Max
|
||||
end.
|
||||
|
||||
-spec get_max_items_node(host()) -> undefined | unlimited | non_neg_integer().
|
||||
-spec get_max_items_node(host()) -> unlimited | non_neg_integer().
|
||||
get_max_items_node(Host) ->
|
||||
config(Host, max_items_node, undefined).
|
||||
config(Host, max_items_node, ?MAXITEMS).
|
||||
|
||||
-spec get_max_item_expire_node(host()) -> infinity | non_neg_integer().
|
||||
get_max_item_expire_node(Host) ->
|
||||
|
Loading…
Reference in New Issue
Block a user