Skip to content

Commit

Permalink
refactor(torii-grpc): empty hashed keys in subscription match all ent…
Browse files Browse the repository at this point in the history
…ities (#2154)

refactor: empty hashed keys in subscription match all entities
  • Loading branch information
Larkooo authored Jul 8, 2024
1 parent 7f5514d commit 4a46303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/torii/grpc/src/server/subscriptions/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl Service {
// matches the key pattern of the subscriber.
match &sub.keys {
Some(EntityKeysClause::HashedKeys(hashed_keys)) => {
if !hashed_keys.contains(&hashed) {
if !hashed_keys.is_empty() && !hashed_keys.contains(&hashed) {
continue;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Service {
// matches the key pattern of the subscriber.
match &sub.keys {
Some(EntityKeysClause::HashedKeys(hashed_keys)) => {
if !hashed_keys.contains(&hashed) {
if !hashed_keys.is_empty() && !hashed_keys.contains(&hashed) {
continue;
}
}
Expand Down

0 comments on commit 4a46303

Please sign in to comment.