fix: dont send to subscriptions that don't have any ContentTopic (#695)

This commit is contained in:
harsh jain 2023-08-30 17:35:08 +07:00 committed by GitHub
parent 4c52149fac
commit 4a546d12d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,7 +225,7 @@ func iterateSubscriptionSet(logger *zap.Logger, subscriptions SubscriptionSet, e
defer subscription.RUnlock()
_, ok := subscription.ContentTopics[envelope.Message().ContentTopic]
if !ok && len(subscription.ContentTopics) != 0 {
if !ok { // only send the msg to subscriptions that have matching contentTopic
return
}