Do not automatically decline requests in manual accept
When community owners accept pending requests manually, they would be declined in that process if the request doesn't fullfill the required token permission criteria. We don't want this to automatically reject those requests anymore, instead, owners have to manually reject the requests.
This commit is contained in:
parent
5ec9e1ac46
commit
7bc03e22f7
|
@ -1227,14 +1227,6 @@ func (m *Manager) AcceptRequestToJoin(request *requests.AcceptRequestToJoinCommu
|
|||
}
|
||||
|
||||
if !hasPermission {
|
||||
pk, err := common.HexToPubkey(dbRequest.PublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = m.markRequestToJoinAsCanceled(pk, community)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return community, ErrNoPermissionToJoin
|
||||
}
|
||||
|
||||
|
|
|
@ -732,22 +732,10 @@ func (m *Messenger) AcceptRequestToJoinCommunity(request *requests.AcceptRequest
|
|||
}
|
||||
|
||||
community, err := m.communitiesManager.AcceptRequestToJoin(request)
|
||||
if err != nil && err != communities.ErrNoPermissionToJoin {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err == communities.ErrNoPermissionToJoin {
|
||||
cancel := &requests.DeclineRequestToJoinCommunity{
|
||||
ID: requestToJoin.ID,
|
||||
}
|
||||
response, err := m.DeclineRequestToJoinCommunity(cancel)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response.AddCommunity(community)
|
||||
return response, nil
|
||||
}
|
||||
|
||||
pk, err := common.HexToPubkey(requestToJoin.PublicKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue