From 0c60718bef98ba085b94a1a53681c08d4103e6c7 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Thu, 20 Jun 2013 17:51:07 +0200 Subject: [PATCH] fix empty itemid on publish when passing Access --- src/mod_pubsub.erl | 4 ++-- src/mod_pubsub_odbc.erl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index b5ebcf23c..5d354dd6f 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -2938,10 +2938,10 @@ unsubscribe_node(Host, Node, From, Subscriber, SubId) -> %%% | {error, xmlel()} ). -publish_item(Host, ServerHost, Node, Publisher, <<>>, Payload) -> - publish_item(Host, ServerHost, Node, Publisher, uniqid(), Payload, all); publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) -> publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, all). +publish_item(Host, ServerHost, Node, Publisher, <<>>, Payload, Access) -> + publish_item(Host, ServerHost, Node, Publisher, uniqid(), Payload, Access); publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, Access) -> Action = fun (#pubsub_node{options = Options, type = Type, id = NodeId}) -> Features = features(Type), diff --git a/src/mod_pubsub_odbc.erl b/src/mod_pubsub_odbc.erl index cc035f347..346460337 100644 --- a/src/mod_pubsub_odbc.erl +++ b/src/mod_pubsub_odbc.erl @@ -2600,10 +2600,10 @@ unsubscribe_node(Host, Node, From, Subscriber, SubId) -> %%% | {error, xmlel()} ). -publish_item(Host, ServerHost, Node, Publisher, <<>>, Payload) -> - publish_item(Host, ServerHost, Node, Publisher, uniqid(), Payload, all); publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) -> publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, all). +publish_item(Host, ServerHost, Node, Publisher, <<>>, Payload, Access) -> + publish_item(Host, ServerHost, Node, Publisher, uniqid(), Payload, Access); publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload, Access) -> Action = fun (#pubsub_node{options = Options, type = Type, id = NodeId}) -> Features = features(Type), -- 2.40.0