mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
fix minor timestamp shift between item creation and modification
SVN Revision: 2586
This commit is contained in:
parent
283aa52b31
commit
75dbcd5c68
@ -481,14 +481,15 @@ publish_item(NodeId, Publisher, PublishModel, MaxItems, ItemId, Payload) ->
|
|||||||
true ->
|
true ->
|
||||||
%% TODO: check creation, presence, roster
|
%% TODO: check creation, presence, roster
|
||||||
if MaxItems > 0 ->
|
if MaxItems > 0 ->
|
||||||
PubId = {now(), SubKey},
|
Now = now(),
|
||||||
|
PubId = {Now, SubKey},
|
||||||
Item = case get_item(NodeId, ItemId) of
|
Item = case get_item(NodeId, ItemId) of
|
||||||
{result, OldItem} ->
|
{result, OldItem} ->
|
||||||
OldItem#pubsub_item{modification = PubId,
|
OldItem#pubsub_item{modification = PubId,
|
||||||
payload = Payload};
|
payload = Payload};
|
||||||
_ ->
|
_ ->
|
||||||
#pubsub_item{itemid = {ItemId, NodeId},
|
#pubsub_item{itemid = {ItemId, NodeId},
|
||||||
creation = {now(), GenKey},
|
creation = {Now, GenKey},
|
||||||
modification = PubId,
|
modification = PubId,
|
||||||
payload = Payload}
|
payload = Payload}
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user