diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f05c16..1bf7c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,10 @@ All notable changes to PeerSpeak are documented here. ## [Unreleased] ### Fixed -- **Friends list now reflects status changes without a restart.** A presence probe that fails now actively marks the friend **offline**, so a friend who goes offline, leaves a room, or turns invisible no longer lingers showing a stale "online" / "in a room" status until PeerSpeak is relaunched. Previously only successful probes updated the list, so it could ratchet a friend's status up but never down. The list continues to auto-refresh every 60 seconds. +- **Friends list now reflects status changes without a restart.** A presence probe that fails now actively marks the friend **offline**, so a friend who goes offline, leaves a room, or turns invisible no longer lingers showing a stale "online" / "in a room" status until PeerSpeak is relaunched. Previously only successful probes updated the list, so it could ratchet a friend's status up but never down. The auto-refresh interval was also shortened from 60s to **15s** so the list tracks changes more closely. ### Added -- **Manual "⟳ Rescan" button** on the Friends panel that refreshes everyone's presence immediately, instead of waiting for the next 60-second auto-refresh. +- **Manual "⟳ Rescan" button** on the Friends panel that refreshes everyone's presence immediately, instead of waiting for the next auto-refresh. ### Licensing - **PeerSpeak is now released under the MIT License** (previously an unlicensed private build). Added a `LICENSE` file and a `THIRD_PARTY_LICENSES` file enumerating the full dependency manifest plus the canonical text of every referenced license, with notices for the statically bundled Opus codec and the embedded fonts (Iced-Icons, Cantarell/OFL-1.1). Both files ship in the Arch and Debian packages. diff --git a/src/core/mod.rs b/src/core/mod.rs index b5fe8e4..a225d48 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -966,10 +966,12 @@ async fn persist_and_emit_friends( .await; } -/// How often the outbound presence scheduler refreshes friends' status. Slow on -/// purpose — presence is best-effort, not real-time, and each pass opens a short -/// connection per friend. -const PING_INTERVAL: Duration = Duration::from_secs(60); +/// How often the outbound presence scheduler refreshes friends' status. Each pass +/// opens one short connection per friend with a saved address, so the cost scales +/// with friend-count, not a fixed per-tick cost. 15s keeps the list feeling live +/// without aggressively probing peers for a best-effort signal; the manual Rescan +/// button covers the "update now" case below this interval. +const PING_INTERVAL: Duration = Duration::from_secs(15); /// Delay before the FIRST presence pass, so the endpoint's background `online()` /// has a moment to finish (otherwise the first probes fail and friends flash offline). const PING_STARTUP_DELAY: Duration = Duration::from_secs(3);