From f0a5a4687f16ead37bc90026b7e513a0e2ee287f Mon Sep 17 00:00:00 2001 From: jolavillette Date: Thu, 9 Jul 2026 09:27:23 +0200 Subject: [PATCH] Fix "Accept friend request" button persisting after SSL-only friend added In the Activity feed, accepting an unknown peer (no PGP key in keyring) adds it as an SSL-only friend via addSslOnlyFriend(), which sets skip_pgp_signature_validation instead of the PGP-keyring accept_connection flag. SecurityItem::updateItem() only tested details.accept_connection to decide button visibility, so for an accepted SSL-only friend the condition stayed false and the "Accept friend request" button kept being shown (and "Remove friend" stayed hidden), even though the peer was already a friend. Treat skip_pgp_signature_validation == true as accepted too, since that flag is only set for a peer already present in the friend list. Co-Authored-By: Claude Opus 4.8 (1M context) --- retroshare-gui/src/gui/feeds/SecurityItem.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.cpp b/retroshare-gui/src/gui/feeds/SecurityItem.cpp index 234b97b48..6d6023d81 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityItem.cpp @@ -300,7 +300,12 @@ void SecurityItem::updateItem() chatButton->hide(); } - if (details.accept_connection) + // accept_connection is a PGP-keyring flag, only set when we own the peer's + // PGP key. An SSL-only friend (accepted unknown peer / short invite) has no + // PGP key, so it is flagged by skip_pgp_signature_validation instead. Treat + // both as accepted, otherwise the "Accept friend request" button keeps being + // shown after an SSL-only friend has already been added. + if (details.accept_connection || details.skip_pgp_signature_validation) { friendRequesttoolButton->hide(); requestLabel->hide();