mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix crash when user publishes an item (EJAB-1457)
This commit is contained in:
parent
529ab22a79
commit
33544569fb
@ -2024,8 +2024,8 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
|
||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||
PersistItems = get_option(Options, persist_items),
|
||||
MaxItems = case PersistItems of
|
||||
0 -> 0;
|
||||
1 -> max_items(Host, Options)
|
||||
false -> 0;
|
||||
true -> max_items(Host, Options)
|
||||
end,
|
||||
PayloadCount = payload_xmlelements(Payload),
|
||||
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
|
||||
|
Loading…
Reference in New Issue
Block a user