Skip to content

Commit

Permalink
fix get clientID by resource
Browse files Browse the repository at this point in the history
be more tolerant in resourceAddress matching to allow "/" prefix

Signed-off-by: Jack Ding <[email protected]>
  • Loading branch information
jzding committed Jul 29, 2024
1 parent 19a18fd commit 4b6663d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v1/subscriber/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (p *API) GetClientIDByResource(resource string) (clientIDs []uuid.UUID) {
defer p.SubscriberStore.RUnlock()
for _, subs := range p.SubscriberStore.Store {
for _, sub := range subs.SubStore.Store {
if sub.GetResource() == resource {
if strings.Contains(sub.GetResource(), resource) {
clientIDs = append(clientIDs, subs.ClientID)
}
}
Expand Down

0 comments on commit 4b6663d

Please sign in to comment.