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

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."
This commit is contained in:
Holger Weiss 2019-01-08 21:23:21 +01:00
parent edf03b0f3d
commit c3a807832d

View File

@ -255,7 +255,7 @@ publish_data(JID, Data) ->
{access_model, whitelist}], {access_model, whitelist}],
case mod_pubsub:publish_item( case mod_pubsub:publish_item(
LBJID, LServer, ?NS_STORAGE_BOOKMARKS, JID, LBJID, LServer, ?NS_STORAGE_BOOKMARKS, JID,
<<>>, [El], PubOpts, all) of <<"current">>, [El], PubOpts, all) of
{result, _} -> ok; {result, _} -> ok;
{error, _} = Err -> Err {error, _} = Err -> Err
end end