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

Set ciao as default advertiser #1066

Merged
merged 1 commit into from
Jul 21, 2024
Merged

Set ciao as default advertiser #1066

merged 1 commit into from
Jul 21, 2024

Conversation

donavanbecker
Copy link
Contributor

♻️ Current situation

Bonjour is currently the default advertiser

💡 Proposed solution

Set Ciao as the default advertiser

⚙️ Release Notes

Caio is now the default advertiser

@donavanbecker donavanbecker changed the base branch from latest to beta-1.0.1 July 20, 2024 03:21
@@ -1186,16 +1186,16 @@ export class Accessory extends EventEmitter {
// create our Advertiser which broadcasts our presence over mdns
const parsed = Accessory.parseBindOption(info);

let selectedAdvertiser = info.advertiser ?? MDNSAdvertiser.BONJOUR;
let selectedAdvertiser = info.advertiser ?? MDNSAdvertiser.CIAO;
if (
(info.advertiser === MDNSAdvertiser.AVAHI && !await AvahiAdvertiser.isAvailable()) ||
(info.advertiser === MDNSAdvertiser.RESOLVED && !await ResolvedAdvertiser.isAvailable())
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The test should be against selectedAdvertiser, not the info block, or use the nullish coalescing assignment operator and refactor slightly:

info.advertiser ??= MDNSAdvertiser.CIAO;

Then you can eliminate declaring and using selectedAdvertiser altogether.

@github-actions github-actions bot added the beta This is in some form related to the current beta release label Jul 21, 2024
@hjdhjd
Copy link
Contributor

hjdhjd commented Jul 21, 2024

Looks good.

@donavanbecker donavanbecker merged commit 769298f into beta-1.0.1 Jul 21, 2024
9 of 10 checks passed
@donavanbecker donavanbecker deleted the ciao-default branch July 21, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta This is in some form related to the current beta release latest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants