server must generate itemid if not given at publish time (EJAB-1409)

This commit is contained in:
Christophe Romain 2011-02-21 12:08:58 +01:00
parent 60d83f937d
commit 15749a2193
3 changed files with 4 additions and 4 deletions

View File

@ -2409,7 +2409,7 @@ unsubscribe_node(Host, Node, From, Subscriber, SubId) ->
%%<li>The item contains more than one payload element or the namespace of the root payload element does not match the configured namespace for the node.</li>
%%<li>The request does not match the node configuration.</li>
%%</ul>
publish_item(Host, ServerHost, Node, Publisher, "", Payload) ->
publish_item(Host, ServerHost, Node, Publisher, <<>>, Payload) ->
%% if publisher does not specify an ItemId, the service MUST generate the ItemId
publish_item(Host, ServerHost, Node, Publisher, uniqid(), Payload);
publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->

View File

@ -2204,7 +2204,7 @@ unsubscribe_node(Host, Node, From, Subscriber, SubId) ->
%%<li>The item contains more than one payload element or the namespace of the root payload element does not match the configured namespace for the node.</li>
%%<li>The request does not match the node configuration.</li>
%%</ul>
publish_item(Host, ServerHost, Node, Publisher, "", Payload) ->
publish_item(Host, ServerHost, Node, Publisher, <<>>, Payload) ->
%% if publisher does not specify an ItemId, the service MUST generate the ItemId
publish_item(Host, ServerHost, Node, Publisher, uniqid(), Payload);
publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->

View File

@ -1,5 +1,5 @@
--- mod_pubsub.erl 2011-02-09 14:26:03.000000000 +0100
+++ mod_pubsub_odbc.erl 2011-02-09 16:31:15.000000000 +0100
--- mod_pubsub.erl 2011-02-21 12:07:31.000000000 +0100
+++ mod_pubsub_odbc.erl 2011-02-21 12:07:50.000000000 +0100
@@ -42,7 +42,7 @@
%%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see
%%% XEP-0060 section 12.18.