diff --git a/CHANGELOG.md b/CHANGELOG.md index d6aed91c7..ce22679ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/lib/Accessory.ts b/src/lib/Accessory.ts index 1784fec42..e99b458f9 100644 --- a/src/lib/Accessory.ts +++ b/src/lib/Accessory.ts @@ -1186,19 +1186,19 @@ 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; + 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; + info.advertiser = MDNSAdvertiser.CIAO; } - switch (selectedAdvertiser) { + switch (info.advertiser) { case MDNSAdvertiser.CIAO: this._advertiser = new CiaoAdvertiser(this._accessoryInfo, { interface: parsed.advertiserAddress,