diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-07-28 18:53:15 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2021-07-28 18:53:15 +0200 |
commit | 2050cdffb457c4adbf5070de2ea84c59b2dc61a3 (patch) | |
tree | c268fcacc9b35d661308791691db0bac9f15de2e | |
parent | mod_push: Fix handling of MUC/Sub messages (diff) |
PubSub: Use configured 'max_items' by default
If clients don't ask for a specific 'max_items' limit, use the value of
mod_pubsub's 'max_items_node' option as default, rather than the
hard-coded ?MAXITEMS value. This makes sure clients cannot circumvent a
smaller, configured limit.
-rw-r--r-- | src/mod_pubsub.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index fecb35341..b0dca4b0d 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -3406,7 +3406,7 @@ max_items(Host, Options) -> case get_option(Options, max_items) of I when is_integer(I), I < 0 -> 0; I when is_integer(I) -> I; - _ -> ?MAXITEMS + _ -> get_max_items_node(Host) end; false -> case get_option(Options, send_last_published_item) of |