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:
parent
2723056fae
commit
530ac43758
@ -2952,10 +2952,7 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, Access) ->
|
|||||||
PublishModel = get_option(Options, publish_model),
|
PublishModel = get_option(Options, publish_model),
|
||||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||||
PersistItems = get_option(Options, persist_items),
|
PersistItems = get_option(Options, persist_items),
|
||||||
MaxItems = case PersistItems of
|
MaxItems = max_items(Host, Options),
|
||||||
false -> 0;
|
|
||||||
true -> max_items(Host, Options)
|
|
||||||
end,
|
|
||||||
PayloadCount = payload_xmlelements(Payload),
|
PayloadCount = payload_xmlelements(Payload),
|
||||||
PayloadSize = byte_size(term_to_binary(Payload)) - 2,
|
PayloadSize = byte_size(term_to_binary(Payload)) - 2,
|
||||||
PayloadMaxSize = get_option(Options, max_payload_size),
|
PayloadMaxSize = get_option(Options, max_payload_size),
|
||||||
|
@ -2618,9 +2618,9 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, Access) ->
|
|||||||
Features = features(Type),
|
Features = features(Type),
|
||||||
PublishFeature = lists:member(<<"publish">>, Features),
|
PublishFeature = lists:member(<<"publish">>, Features),
|
||||||
PublishModel = get_option(Options, publish_model),
|
PublishModel = get_option(Options, publish_model),
|
||||||
MaxItems = max_items(Host, Options),
|
|
||||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||||
PersistItems = get_option(Options, persist_items),
|
PersistItems = get_option(Options, persist_items),
|
||||||
|
MaxItems = max_items(Host, Options),
|
||||||
PayloadCount = payload_xmlelements(Payload),
|
PayloadCount = payload_xmlelements(Payload),
|
||||||
PayloadSize = byte_size(term_to_binary(Payload)) - 2,
|
PayloadSize = byte_size(term_to_binary(Payload)) - 2,
|
||||||
PayloadMaxSize = get_option(Options, max_payload_size),
|
PayloadMaxSize = get_option(Options, max_payload_size),
|
||||||
|
Loading…
Reference in New Issue
Block a user