1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2024-12-29 19:32:05 +01:00

Use local epoch value for started timestamp

This commit is contained in:
Andrew Kwon 2021-01-03 12:21:23 -08:00
parent f3151560a7
commit 42f6c79eb0

View file

@ -195,6 +195,9 @@ function Presence:update_for_buffer(buffer)
name, asset_key, description = unpack(files[extension])
end
-- TODO: Update timestamp to be workspace-specific
local started_at = os.time()
local activity = {
state = string.format("Editing %s", filename),
assets = {
@ -204,7 +207,7 @@ function Presence:update_for_buffer(buffer)
small_text = description or name,
},
timestamps = {
start = os.time(os.date("!*t"))
start = started_at
},
}