fix: non protected pubsub topic for communities

This commit is contained in:
Richard Ramos 2023-10-30 12:12:05 -04:00 committed by richΛrd
parent 85f8c92cde
commit c1a6771977
2 changed files with 1 additions and 9 deletions

View File

@ -12,8 +12,6 @@ import (
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/waku-org/go-waku/waku/v2/protocol/relay"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/images" "github.com/status-im/status-go/images"
@ -1286,7 +1284,7 @@ func (o *Community) DefaultFilters() []transport.FiltersToInitialize {
return []transport.FiltersToInitialize{ return []transport.FiltersToInitialize{
{ChatID: cID, PubsubTopic: communityPubsubTopic}, {ChatID: cID, PubsubTopic: communityPubsubTopic},
{ChatID: uncompressedPubKey, PubsubTopic: relay.DefaultWakuTopic}, // TODO: messages that are not protected are sent in default pubsub topic for now {ChatID: uncompressedPubKey, PubsubTopic: common.DefaultNonProtectedPubsubTopic(o.Shard())},
{ChatID: uncompressedPubKey, PubsubTopic: communityPubsubTopic}, {ChatID: uncompressedPubKey, PubsubTopic: communityPubsubTopic},
{ChatID: updatesChannelID, PubsubTopic: communityPubsubTopic}, {ChatID: updatesChannelID, PubsubTopic: communityPubsubTopic},
{ChatID: mlChannelID, PubsubTopic: communityPubsubTopic}, {ChatID: mlChannelID, PubsubTopic: communityPubsubTopic},

View File

@ -1641,12 +1641,6 @@ func (m *Messenger) Init() error {
logger := m.logger.With(zap.String("site", "Init")) logger := m.logger.With(zap.String("site", "Init"))
// Community requests will arrive in this pubsub topic
err := m.SubscribeToPubsubTopic(common.DefaultNonProtectedPubsubTopic(nil), nil)
if err != nil {
return err
}
var ( var (
filtersToInit []transport.FiltersToInitialize filtersToInit []transport.FiltersToInitialize
publicKeys []*ecdsa.PublicKey publicKeys []*ecdsa.PublicKey