25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

store item when persist_item=false and cache_last_item=false but need last_item

This commit is contained in:
Christophe Romain 2014-05-05 13:49:02 +02:00
parent 2723056fae
commit 530ac43758
2 changed files with 2 additions and 5 deletions

View File

@ -2952,10 +2952,7 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, Access) ->
PublishModel = get_option(Options, publish_model),
DeliverPayloads = get_option(Options, deliver_payloads),
PersistItems = get_option(Options, persist_items),
MaxItems = case PersistItems of
false -> 0;
true -> max_items(Host, Options)
end,
MaxItems = max_items(Host, Options),
PayloadCount = payload_xmlelements(Payload),
PayloadSize = byte_size(term_to_binary(Payload)) - 2,
PayloadMaxSize = get_option(Options, max_payload_size),

View File

@ -2618,9 +2618,9 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, Access) ->
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 = max_items(Host, Options),
PayloadCount = payload_xmlelements(Payload),
PayloadSize = byte_size(term_to_binary(Payload)) - 2,
PayloadMaxSize = get_option(Options, max_payload_size),