diff --git a/protocol/communities/manager.go b/protocol/communities/manager.go index 3cac3ab86..35dd66ecb 100644 --- a/protocol/communities/manager.go +++ b/protocol/communities/manager.go @@ -1449,7 +1449,9 @@ func (m *Manager) ScheduleMembersReevaluation(communityID types.HexBytes) error func (m *Manager) scheduleMembersReevaluation(communityID types.HexBytes, forceImmediateReevaluation bool) error { t, exists := m.membersReevaluationTasks.Load(communityID.String()) if !exists { - return errors.New("reevaluation task doesn't exist") + // No reevaluation task yet. We start the loop which will create it + m.StartMembersReevaluationLoop(communityID, true) + return nil } task, ok := t.(*membersReevaluationTask) diff --git a/protocol/messenger_communities.go b/protocol/messenger_communities.go index 2f77b4f9d..f012fc082 100644 --- a/protocol/messenger_communities.go +++ b/protocol/messenger_communities.go @@ -2739,7 +2739,10 @@ func (m *Messenger) CreateCommunityTokenPermission(request *requests.CreateCommu } if community.IsControlNode() { - m.communitiesManager.StartMembersReevaluationLoop(community.ID(), true) + err = m.communitiesManager.ScheduleMembersReevaluation(community.ID()) + if err != nil { + return nil, err + } } // ensure HRkeys are synced