mirror of
https://github.com/status-im/status-go.git
synced 2025-02-16 08:50:09 +00:00
Add request to response when canceling request
This commit is contained in:
parent
7123b22c52
commit
5d81866957
@ -276,8 +276,8 @@ var _bintree = &bintree{nil, map[string]*bintree{
|
|||||||
"tests": {nil, map[string]*bintree{
|
"tests": {nil, map[string]*bintree{
|
||||||
"qr": {nil, map[string]*bintree{
|
"qr": {nil, map[string]*bintree{
|
||||||
"QRWithLogo.png": {_assetsTestsQrQrwithlogoPng, map[string]*bintree{}},
|
"QRWithLogo.png": {_assetsTestsQrQrwithlogoPng, map[string]*bintree{}},
|
||||||
"defaultQR.png": {_assetsTestsQrDefaultqrPng, map[string]*bintree{}},
|
"defaultQR.png": {_assetsTestsQrDefaultqrPng, map[string]*bintree{}},
|
||||||
"status.png": {_assetsTestsQrStatusPng, map[string]*bintree{}},
|
"status.png": {_assetsTestsQrStatusPng, map[string]*bintree{}},
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
|
@ -1042,6 +1042,7 @@ func (m *Manager) CancelRequestToJoin(request *requests.CancelRequestToJoinCommu
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dbRequest.State = RequestToJoinStateCanceled
|
||||||
if err := m.markRequestToJoinAsCanceled(pk, community); err != nil {
|
if err := m.markRequestToJoinAsCanceled(pk, community); err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
@ -1183,6 +1183,8 @@ func (s *MessengerCommunitiesSuite) TestCancelRequestAccess() {
|
|||||||
response, err = s.alice.CancelRequestToJoinCommunity(requestToCancel)
|
response, err = s.alice.CancelRequestToJoinCommunity(requestToCancel)
|
||||||
s.Require().NoError(err)
|
s.Require().NoError(err)
|
||||||
s.Require().NotNil(response)
|
s.Require().NotNil(response)
|
||||||
|
s.Require().Len(response.RequestsToJoinCommunity, 1)
|
||||||
|
s.Require().Equal(communities.RequestToJoinStateCanceled, response.RequestsToJoinCommunity[0].State)
|
||||||
|
|
||||||
// pull to make sure it has been saved
|
// pull to make sure it has been saved
|
||||||
cancelRequestsToJoin, err := s.alice.MyCanceledRequestsToJoin()
|
cancelRequestsToJoin, err := s.alice.MyCanceledRequestsToJoin()
|
||||||
|
@ -685,6 +685,8 @@ func (m *Messenger) CancelRequestToJoinCommunity(request *requests.CancelRequest
|
|||||||
|
|
||||||
response := &MessengerResponse{}
|
response := &MessengerResponse{}
|
||||||
response.AddCommunity(community)
|
response.AddCommunity(community)
|
||||||
|
response.RequestsToJoinCommunity = append(response.RequestsToJoinCommunity, requestToJoin)
|
||||||
|
|
||||||
return response, nil
|
return response, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user