1
0
Fork 0
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:
mcrakhman 2024-01-15 12:45:48 +01:00
parent 296d0b9c6e
commit b7aba63a38
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
2 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -20,6 +20,7 @@ type RequestRecord struct {
RequestIdentity crypto.PubKey
RequestMetadata []byte
KeyRecordId string
RecordId string
Type RequestType
}