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

fix empty pubsub payload check

This commit is contained in:
Christophe Romain 2011-02-14 16:41:32 +01:00
parent fd52f2cb7d
commit c3a88c713b

View File

@ -2025,7 +2025,7 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
DeliverPayloads = get_option(Options, deliver_payloads),
PersistItems = get_option(Options, persist_items),
PayloadCount = payload_xmlelements(Payload),
PayloadSize = size(term_to_binary(Payload)),
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
PayloadMaxSize = get_option(Options, max_payload_size),
% pubsub#deliver_payloads true
% pubsub#persist_items true -> 1 item; false -> 0 item