mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
fix minor timestamp shift between item creation and modification
SVN Revision: 2585
This commit is contained in:
parent
9d8de17b4d
commit
860957d20c
@ -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