]> granicus.if.org Git - ejabberd/commitdiff
fix minor timestamp shift between item creation and modification
authorChristophe Romain <christophe.romain@process-one.net>
Fri, 4 Sep 2009 23:32:13 +0000 (23:32 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Fri, 4 Sep 2009 23:32:13 +0000 (23:32 +0000)
SVN Revision: 2585

src/mod_pubsub/node_hometree.erl

index e69e866ae1ca3d59650a25ac12f27f4848e433c5..c4fcde6dadd9216536fd1b9a6263c126ab1ef030 100644 (file)
@@ -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,