]> granicus.if.org Git - ejabberd/commitdiff
Revert "Fix pubsub compliance XEP-0060 ยง 7.1.3.6 (#2864)"
authorChristophe Romain <christophe.romain@process-one.net>
Tue, 11 Jun 2019 08:18:36 +0000 (10:18 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Tue, 11 Jun 2019 08:18:36 +0000 (10:18 +0200)
This reverts commit 2fff4d1ea6f32babc3ae06ef877faaacb8ba3c1b.
This commit broke the XEP compliance. more details here
https://xmpp.org/extensions/xep-0060.html#events

src/mod_pubsub.erl

index ea6113e4b5abeab6953840b2160c3e427622b1b5..1f220f3c69c9cbe1e322daa8134ca37c5311a915 100644 (file)
@@ -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 ->