mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
Add record id as a field
This commit is contained in:
parent
296d0b9c6e
commit
b7aba63a38
2 changed files with 3 additions and 0 deletions
|
@ -402,6 +402,7 @@ func (st *AclState) applyRequestJoin(ch *aclrecordproto.AclAccountRequestJoin, r
|
|||
RequestIdentity: record.Identity,
|
||||
RequestMetadata: ch.Metadata,
|
||||
KeyRecordId: st.CurrentReadKeyId(),
|
||||
RecordId: record.Id,
|
||||
Type: RequestTypeJoin,
|
||||
}
|
||||
return nil
|
||||
|
@ -497,6 +498,7 @@ func (st *AclState) applyRequestRemove(ch *aclrecordproto.AclAccountRequestRemov
|
|||
st.requestRecords[record.Id] = RequestRecord{
|
||||
RequestIdentity: record.Identity,
|
||||
Type: RequestTypeRemove,
|
||||
RecordId: record.Id,
|
||||
}
|
||||
st.pendingRequests[mapKeyFromPubKey(record.Identity)] = record.Id
|
||||
return nil
|
||||
|
|
|
@ -20,6 +20,7 @@ type RequestRecord struct {
|
|||
RequestIdentity crypto.PubKey
|
||||
RequestMetadata []byte
|
||||
KeyRecordId string
|
||||
RecordId string
|
||||
Type RequestType
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue