Skip to content

Commit

Permalink
feat: add CommunityEncryptionKeyActions and its evaluation logic
Browse files Browse the repository at this point in the history
Added utility that evaluates necessary encryption key actions based on
community changes.

part of: status-im/status-desktop#10998
  • Loading branch information
osmaczko committed Jul 20, 2023
1 parent 9de6436 commit dc3ae77
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocol/communities/community.go
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,9 @@ func (o *Community) RequestsToJoin() []*RequestToJoin {
}

func (o *Community) AddMember(publicKey *ecdsa.PublicKey, roles []protobuf.CommunityMember_Roles) (*CommunityChanges, error) {
o.mutex.Lock()
defer o.mutex.Unlock()

if !o.IsOwnerOrAdmin() {
return nil, ErrNotAdmin
}
Expand Down

0 comments on commit dc3ae77

Please sign in to comment.