Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow content topic matching when topic list is empty #316

Merged

Conversation

pete-eiger
Copy link
Contributor

allows matching of content topic when provided content topic list is empty, required for graphops/listener-radio#27

@pete-eiger pete-eiger requested a review from hopeyen February 1, 2024 10:57
content_topics.lock().unwrap().iter().any(|t| t == topic)
let locked_topics = content_topics.lock().unwrap();

if locked_topics.is_empty() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work

locked_topics.is_empty() || locked_topics.contains(&topic)

@pete-eiger pete-eiger force-pushed the petko/allow-content-topic-matching-when-topics-list-is-empty branch from 154dce7 to 29e4f45 Compare February 1, 2024 15:57
@pete-eiger pete-eiger requested a review from hopeyen February 1, 2024 16:00
@pete-eiger pete-eiger merged commit 5b300e6 into dev Feb 1, 2024
7 checks passed
@pete-eiger pete-eiger deleted the petko/allow-content-topic-matching-when-topics-list-is-empty branch February 1, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants