mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Send timestamp to addcontent
This commit is contained in:
parent
21bde9743d
commit
2958e32636
4 changed files with 68 additions and 8 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"github.com/anytypeio/any-sync/util/cidutil"
|
||||
"github.com/anytypeio/any-sync/util/crypto"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ErrEmptyChange = errors.New("change payload should not be empty")
|
||||
|
@ -20,6 +19,7 @@ type BuilderContent struct {
|
|||
PrivKey crypto.PrivKey
|
||||
ReadKey crypto.SymKey
|
||||
Content []byte
|
||||
Timestamp int64
|
||||
}
|
||||
|
||||
type InitialContent struct {
|
||||
|
@ -166,7 +166,7 @@ func (c *changeBuilder) Build(payload BuilderContent) (ch *Change, rawIdChange *
|
|||
AclHeadId: payload.AclHeadId,
|
||||
SnapshotBaseId: payload.SnapshotBaseId,
|
||||
ReadKeyId: payload.ReadKeyId,
|
||||
Timestamp: time.Now().Unix(),
|
||||
Timestamp: payload.Timestamp,
|
||||
Identity: identity,
|
||||
IsSnapshot: payload.IsSnapshot,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue