25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

fix empty itemid on publish when passing Access

This commit is contained in:
Christophe Romain 2013-06-20 17:51:07 +02:00
parent 4221d56c04
commit 0c60718bef
2 changed files with 4 additions and 4 deletions

View File

@ -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),

View File

@ -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),