mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
fix empty pubsub payload check
This commit is contained in:
parent
4a2005f7cc
commit
72395ba497
@ -2421,7 +2421,7 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
|
|||||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||||
PersistItems = get_option(Options, persist_items),
|
PersistItems = get_option(Options, persist_items),
|
||||||
{PayloadCount, PayloadNS} = payload_els_ns(Payload),
|
{PayloadCount, PayloadNS} = payload_els_ns(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),
|
PayloadMaxSize = get_option(Options, max_payload_size),
|
||||||
InvalidNS = case get_option(Options, type) of
|
InvalidNS = case get_option(Options, type) of
|
||||||
false -> false;
|
false -> false;
|
||||||
|
@ -2216,7 +2216,7 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
|
|||||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||||
PersistItems = get_option(Options, persist_items),
|
PersistItems = get_option(Options, persist_items),
|
||||||
{PayloadCount, PayloadNS} = payload_els_ns(Payload),
|
{PayloadCount, PayloadNS} = payload_els_ns(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),
|
PayloadMaxSize = get_option(Options, max_payload_size),
|
||||||
InvalidNS = case get_option(Options, type) of
|
InvalidNS = case get_option(Options, type) of
|
||||||
false -> false;
|
false -> false;
|
||||||
|
Loading…
Reference in New Issue
Block a user