diff --git a/protocol/communities_events_utils_test.go b/protocol/communities_events_utils_test.go index 017457bc1..cf0ae61d3 100644 --- a/protocol/communities_events_utils_test.go +++ b/protocol/communities_events_utils_test.go @@ -1368,7 +1368,9 @@ func testRejectMemberRequestToJoin(base CommunityEventsTestsInterface, community response, err = WaitOnMessengerResponse( base.GetControlNode(), func(r *MessengerResponse) bool { - return len(r.Communities()) > 0 && !r.Communities()[0].HasMember(&user.identity.PublicKey) + requests, err := base.GetControlNode().DeclinedRequestsToJoinForCommunity(community.ID()) + s.Require().NoError(err) + return len(response.Communities()) == 1 && len(requests) == 1 }, "control node did not receive community request to join update from event sender", ) diff --git a/protocol/messenger_communities.go b/protocol/messenger_communities.go index 02b52d955..48387ad90 100644 --- a/protocol/messenger_communities.go +++ b/protocol/messenger_communities.go @@ -2110,13 +2110,7 @@ func (m *Messenger) UpdateCommunityFilters(community *communities.Community, pri publicFiltersToInit := make([]transport.FiltersToInitialize, 0, len(community.DefaultFilters())+len(community.Chats())) - for _, df := range community.DefaultFilters() { - _, err := m.transport.RemoveFilterByChatID(df.ChatID) - if err != nil { - return err - } - publicFiltersToInit = append(publicFiltersToInit, df) - } + publicFiltersToInit = append(publicFiltersToInit, community.DefaultFilters()...) for chatID := range community.Chats() { communityChatID := community.IDString() + chatID