Skip to content

Commit

Permalink
Set ciao as default advertiser
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Jul 20, 2024
1 parent c3591d5 commit 2a0bd3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to `hap-nodejs` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).

## Next Release

### Changes

- Set `Ciao` as the default Advertiser

## v1.0.0 (2024-07-10)

### Breaking Changes
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Accessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
) {
console.error(
`[${this.displayName}] The selected advertiser, "${info.advertiser}", isn't available on this platform. ` +
`Reverting to "${MDNSAdvertiser.BONJOUR}"`,
`Reverting to "${MDNSAdvertiser.CIAO}"`,
);
selectedAdvertiser = MDNSAdvertiser.BONJOUR;
selectedAdvertiser = MDNSAdvertiser.CIAO;
}

switch (selectedAdvertiser) {
Expand Down

0 comments on commit 2a0bd3d

Please sign in to comment.