From c3a807832dac01d0668233853c17deb73702114f Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 8 Jan 2019 21:23:21 +0100 Subject: [PATCH] mod_private: Hardcode item ID for PEP bookmarks Set the item ID to "current" when publishing bookmarks via PEP. XEP-0060 says: For singleton nodes, "it is RECOMMENDED for the publisher to specify an ItemID of 'current' to ensure that the publication of a new item will overwrite the existing item." --- src/mod_private.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_private.erl b/src/mod_private.erl index b32fff98e..52aed7aeb 100644 --- a/src/mod_private.erl +++ b/src/mod_private.erl @@ -255,7 +255,7 @@ publish_data(JID, Data) -> {access_model, whitelist}], case mod_pubsub:publish_item( LBJID, LServer, ?NS_STORAGE_BOOKMARKS, JID, - <<>>, [El], PubOpts, all) of + <<"current">>, [El], PubOpts, all) of {result, _} -> ok; {error, _} = Err -> Err end