mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-09 17:45:03 +09:00
Add empty response for proto message
This commit is contained in:
parent
9b7b92f5c2
commit
491fe04d5c
2 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,9 @@ func (r *Response) MsgSize() uint64 {
|
|||
}
|
||||
|
||||
func (r *Response) ProtoMessage() (proto.Message, error) {
|
||||
if r.objectId == "" {
|
||||
return &spacesyncproto.ObjectSyncMessage{}, nil
|
||||
}
|
||||
resp := &consensusproto.LogFullSyncResponse{
|
||||
Head: r.head,
|
||||
Records: r.records,
|
||||
|
|
|
@ -29,6 +29,9 @@ func (r *Response) MsgSize() uint64 {
|
|||
}
|
||||
|
||||
func (r *Response) ProtoMessage() (proto.Message, error) {
|
||||
if r.objectId == "" {
|
||||
return &spacesyncproto.ObjectSyncMessage{}, nil
|
||||
}
|
||||
resp := &treechangeproto.TreeFullSyncResponse{
|
||||
Heads: r.heads,
|
||||
SnapshotPath: r.snapshotPath,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue