diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2011-05-31 16:09:27 +0200 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2011-05-31 16:09:27 +0200 |
commit | 75b6162b44a835efffa243e7efe460892bffcf8a (patch) | |
tree | ee5e37635dc3e7a1633f0cb7feb50ed23cfe249e | |
parent | apply 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)
-rw-r--r-- | src/mod_pubsub/mod_pubsub.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 802294b4a..14b774837 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -2417,9 +2417,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, PayloadNS} = payload_els_ns(Payload), PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2 PayloadMaxSize = get_option(Options, max_payload_size), |