Pubsub node maxitem forced to 0 if non persistent node (thanks to Karim Gemayel)(EJAB-1434)
This commit is contained in:
parent
75510a4b1b
commit
75b6162b44
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue