From: Christophe Romain Date: Tue, 11 Jun 2019 08:18:36 +0000 (+0200) Subject: Revert "Fix pubsub compliance XEP-0060 § 7.1.3.6 (#2864)" X-Git-Tag: 19.08~221 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88a3e1b510e41eb050e86cd196fd0f0b575b7cc6;p=ejabberd Revert "Fix pubsub compliance XEP-0060 § 7.1.3.6 (#2864)" This reverts commit 2fff4d1ea6f32babc3ae06ef877faaacb8ba3c1b. This commit broke the XEP compliance. more details here https://xmpp.org/extensions/xep-0060.html#events --- diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index ea6113e4b..1f220f3c6 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -1805,7 +1805,7 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, PubOpts, Access (DeliverPayloads or PersistItems) and (PayloadCount > 1) -> {error, extended_error(xmpp:err_bad_request(), err_invalid_payload())}; - (not DeliverPayloads) and (PayloadCount > 0) -> + (not (DeliverPayloads or PersistItems)) and (PayloadCount > 0) -> {error, extended_error(xmpp:err_bad_request(), err_item_forbidden())}; true ->