summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2009-09-04 23:32:13 +0000
committerChristophe Romain <christophe.romain@process-one.net>2009-09-04 23:32:13 +0000
commit860957d20c97f38b4461bca818801a956b4327a8 (patch)
tree2defda1114f487c8855b0cf9afc548ca70fd0fab /src
parentUse the local (target) domain for firing the s2s_receive_packet hook. (diff)
fix minor timestamp shift between item creation and modification
SVN Revision: 2585
Diffstat (limited to 'src')
-rw-r--r--src/mod_pubsub/node_hometree.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl
index e69e866a..c4fcde6d 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,