]> granicus.if.org Git - ejabberd/commitdiff
server must generate itemid if not given at publish time (EJAB-1409)
authorChristophe Romain <christophe.romain@process-one.net>
Mon, 21 Feb 2011 11:08:58 +0000 (12:08 +0100)
committerChristophe Romain <christophe.romain@process-one.net>
Mon, 21 Feb 2011 11:08:58 +0000 (12:08 +0100)
src/mod_pubsub/mod_pubsub.erl
src/mod_pubsub/mod_pubsub_odbc.erl
src/mod_pubsub/pubsub_odbc.patch

index 7bc9b151e73635096e8d366865d261a1e3c88124..9b4c9c54f8e8987ebf7f09600d0910fecc988eca 100644 (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) ->
index a6b7a5dff7bba90ae19df50cacfa98b95e492e6d..0ec5e0ab183dd0428cdc0c7029316f7b3deb4013 100644 (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) ->
index 9ed708b378a1a32ef888db4b9883ffcc43d583ac..2053393a7efe5e3a91444a1b9859b566b164ffc8 100644 (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.