Skip to content

Fixed Use as direct source being automatically enabled when re-accepting a denied friend via Activity / Peer Details#286

Open
jolavillette wants to merge 1 commit into
RetroShare:masterfrom
jolavillette:FixUseAsDirectSourceWhenAcceptingFriendViaActivityFeed
Open

Fixed Use as direct source being automatically enabled when re-accepting a denied friend via Activity / Peer Details#286
jolavillette wants to merge 1 commit into
RetroShare:masterfrom
jolavillette:FixUseAsDirectSourceWhenAcceptingFriendViaActivityFeed

Conversation

@jolavillette
Copy link
Copy Markdown
Contributor

Fxed Use as direct source being automatically enabled when re-accepting a denied friend via Activity / Peer Details

Changed Default: Updated RS_NODE_PERM_DEFAULT to NONE in rspeers.h. The option is now unchecked by default when re-accepting a friend.
Adjusted Logic: Updated addFriend in p3peermgr.cc to skip permission masking for new or re-added friends. This ensures the new global default doesn't block explicit flag settings during initial setup.
Result: The checkbox no longer auto-enables via the Activity Feed, while remaining correctly configurable in the connection wizard.

@csoler
Copy link
Copy Markdown
Contributor

csoler commented May 16, 2026

The addFriend function adds a friend with its SSL id (signed by pgp profile ID). The &= is here to make sure that you cannot change the flags for a profile (meaning all friends of that profile) by adding a new friend with more permissive flags. When the profile is not known, servicePermissionFlags(pgp_id) will return the default value (which is changed to NONE here).

Only doing the &= when the profile doesn't exist is not useful since it will default to NONE if it doesn't exist.

I believe that the behavior of the UI is simply changed in the first place after setting the default service flags to NONE.

…ing a denied friend via Activity / Peer Details
@jolavillette jolavillette force-pushed the FixUseAsDirectSourceWhenAcceptingFriendViaActivityFeed branch from 76b3363 to b7f2f7d Compare May 17, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants