fix(friends): self-heal presence + add manual Rescan button
The friends list only ever updated a friend's status on a *successful* presence probe, so it could ratchet a status up (offline -> online -> in a room) but never down. A friend who dropped, left a room, or went invisible kept showing a stale "online"/"in a room" status until PeerSpeak was relaunched (which cleared the in-memory presence map back to offline). The 60s auto-refresh scheduler already existed; the bug was that `probe_friends_once` emitted nothing on a failed probe. Now every pass reports a *definitive* status for every friend: a failed probe (or a friend with no known address) is mapped to a new `FriendPresence::Offline` via the pure, tested `presence::presence_from_probe`, so the list self-heals each cycle. Also adds a manual "⟳ Rescan" button to the Friends panel (new `CoreCommand::RefreshFriends` -> immediate probe pass) for instant feedback instead of waiting up to 60s. 469 lib tests pass, clippy clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,12 @@ 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.
|
||||
|
||||
### Added
|
||||
- **Manual "⟳ Rescan" button** on the Friends panel that refreshes everyone's presence immediately, instead of waiting for the next 60-second 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user