From 75dbcd5c686a3a7deecb62f7d784d955f88f4a1e Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Fri, 4 Sep 2009 23:34:05 +0000 Subject: [PATCH] fix minor timestamp shift between item creation and modification SVN Revision: 2586 --- src/mod_pubsub/node_hometree.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl index 6c9a668dc..1fe14b14b 100644 --- a/src/mod_pubsub/node_hometree.erl +++ b/src/mod_pubsub/node_hometree.erl @@ -481,14 +481,15 @@ publish_item(NodeId, Publisher, PublishModel, MaxItems, ItemId, Payload) -> true -> %% TODO: check creation, presence, roster if MaxItems > 0 -> - PubId = {now(), SubKey}, + Now = now(), + PubId = {Now, SubKey}, Item = case get_item(NodeId, ItemId) of {result, OldItem} -> OldItem#pubsub_item{modification = PubId, payload = Payload}; _ -> #pubsub_item{itemid = {ItemId, NodeId}, - creation = {now(), GenKey}, + creation = {Now, GenKey}, modification = PubId, payload = Payload} end,