aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2011-05-31 15:51:30 +0200
committerChristophe Romain <christophe.romain@process-one.net>2011-05-31 15:51:30 +0200
commitadcf2d5c4e45a4c5b9e1e7756c858e286f5d59bb (patch)
tree3be578b27f3128262ab6e9ed85e3e3c8ff125187 /src
parentapply filtered notification to PEP last items (thanks to karim Gemayel)(EJAB-... (diff)
Pubsub node maxitem forced to 0 if non persistent node (thanks to Karim Gemayel)(EJAB-1434)
Diffstat (limited to 'src')
-rw-r--r--src/mod_pubsub/mod_pubsub.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl
index b0befbcb7..41501b2c2 100644
--- a/src/mod_pubsub/mod_pubsub.erl
+++ b/src/mod_pubsub/mod_pubsub.erl
@@ -2021,9 +2021,12 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
Features = features(Type),
PublishFeature = lists:member("publish", Features),
PublishModel = get_option(Options, publish_model),
- MaxItems = max_items(Host, Options),
DeliverPayloads = get_option(Options, deliver_payloads),
PersistItems = get_option(Options, persist_items),
+ MaxItems = case PersistItems of
+ 0 -> 0;
+ 1 -> max_items(Host, Options)
+ end,
PayloadCount = payload_xmlelements(Payload),
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
PayloadMaxSize = get_option(Options, max_payload_size),