From 860957d20c97f38b4461bca818801a956b4327a8 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Fri, 4 Sep 2009 23:32:13 +0000 Subject: [PATCH] fix minor timestamp shift between item creation and modification SVN Revision: 2585 --- 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 e69e866ae..c4fcde6da 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,