fix: subscribe to spectated community updates after bootstrap

This commit is contained in:
Pascal Precht 2023-02-22 12:41:50 +01:00 committed by r4bbit
parent 0babdad17b
commit c6f6ca99ae
1 changed files with 9 additions and 0 deletions

View File

@ -1461,6 +1461,15 @@ func (m *Messenger) Init() error {
}
}
spectatedCommunities, err := m.communitiesManager.Spectated()
if err != nil {
return err
}
for _, org := range spectatedCommunities {
publicChatIDs = append(publicChatIDs, org.DefaultFilters()...)
}
// Init filters for the communities we are an admin of
var adminCommunitiesPks []*ecdsa.PrivateKey
adminCommunities, err := m.communitiesManager.Created()