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 ->
|
||||
%% 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,
|
||||
|
Loading…
Reference in New Issue
Block a user