fix(communities): set state correctly on request accept or decline (#4144)
Fixes https://github.com/status-im/status-desktop/issues/12413
This commit is contained in:
parent
094228871e
commit
11f670636b
|
@ -1988,6 +1988,7 @@ func (m *Manager) AcceptRequestToJoin(dbRequest *RequestToJoin) (*Community, err
|
|||
}
|
||||
}
|
||||
|
||||
dbRequest.State = RequestToJoinStateAccepted
|
||||
if err := m.markRequestToJoinAsAccepted(pk, community); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -2022,6 +2023,7 @@ func (m *Manager) AcceptRequestToJoin(dbRequest *RequestToJoin) (*Community, err
|
|||
return nil, err
|
||||
}
|
||||
|
||||
dbRequest.State = RequestToJoinStateAcceptedPending
|
||||
if err := m.markRequestToJoinAsAcceptedPending(pk, community); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -2057,6 +2059,7 @@ func (m *Manager) DeclineRequestToJoin(dbRequest *RequestToJoin) (*Community, er
|
|||
requestToJoinState = RequestToJoinStateDeclinedPending // can only be declined by control node
|
||||
}
|
||||
|
||||
dbRequest.State = requestToJoinState
|
||||
err = m.persistence.SetRequestToJoinState(dbRequest.PublicKey, dbRequest.CommunityID, requestToJoinState)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue