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:
Pascal Precht 2023-03-21 16:06:20 +01:00 committed by Follow the white rabbit
parent 5ec9e1ac46
commit 7bc03e22f7
2 changed files with 1 additions and 21 deletions

View File

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

View File

@ -732,21 +732,9 @@ func (m *Messenger) AcceptRequestToJoinCommunity(request *requests.AcceptRequest
}
community, err := m.communitiesManager.AcceptRequestToJoin(request)
if err != nil && err != communities.ErrNoPermissionToJoin {
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 {