fix: missing fields in Communtiy CreateDeepCopy (#4718)

This commit is contained in:
Igor Sirotin 2024-02-12 23:26:32 +00:00 committed by GitHub
parent 432bfeea2f
commit 5e905518aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -2127,11 +2127,14 @@ func (o *Community) CreateDeepCopy() *Community {
Verified: o.config.Verified, Verified: o.config.Verified,
Spectated: o.config.Spectated, Spectated: o.config.Spectated,
Muted: o.config.Muted, Muted: o.config.Muted,
MuteTill: o.config.MuteTill,
Logger: o.config.Logger, Logger: o.config.Logger,
RequestedToJoinAt: o.config.RequestedToJoinAt, RequestedToJoinAt: o.config.RequestedToJoinAt,
RequestsToJoin: o.config.RequestsToJoin, RequestsToJoin: o.config.RequestsToJoin,
MemberIdentity: o.config.MemberIdentity, MemberIdentity: o.config.MemberIdentity,
EventsData: o.config.EventsData, EventsData: o.config.EventsData,
Shard: o.config.Shard,
PubsubTopicPrivateKey: o.config.PubsubTopicPrivateKey,
LastOpenedAt: o.config.LastOpenedAt, LastOpenedAt: o.config.LastOpenedAt,
}, },
timesource: o.timesource, timesource: o.timesource,

View File

@ -642,9 +642,15 @@ func (s *MessengerStoreNodeRequestSuite) TestRequestShardAndCommunityInfo() {
Shard: expectedShard, Shard: expectedShard,
} }
shardTopic := transport.CommunityShardInfoTopic(community.IDString())
contentContentTopic := wakuV2common.BytesToTopic(transport.ToTopic(shardTopic))
storeNodeSubscription := s.setupStoreNodeEnvelopesWatcher(&contentContentTopic)
_, err := s.owner.SetCommunityShard(shardRequest) _, err := s.owner.SetCommunityShard(shardRequest)
s.Require().NoError(err) s.Require().NoError(err)
s.waitForEnvelopes(storeNodeSubscription, 1)
s.waitForAvailableStoreNode(s.bob) s.waitForAvailableStoreNode(s.bob)
communityShard := community.CommunityShard() communityShard := community.CommunityShard()