From 9cca8996fbf9469491365f315bcc73c97e1c003d Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 26 Oct 2025 19:53:07 -0400 Subject: [PATCH 1/2] Add unfriend action to profile friends list --- js/ui/profileModalController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/profileModalController.js b/js/ui/profileModalController.js index bf1f27dc..d050d2d1 100644 --- a/js/ui/profileModalController.js +++ b/js/ui/profileModalController.js @@ -3948,7 +3948,7 @@ export class ProfileModalController { if (hex && !usedModerationService) { const removeButton = this.createRemoveButton({ - label: "Remove", + label: "Unfriend", onRemove: () => this.handleRemoveFriend(hex), }); if (removeButton) { From d8f28f98e9d9261168a0217e51bf109447c662e3 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 26 Oct 2025 20:06:02 -0400 Subject: [PATCH 2/2] Ensure friends list shows unfriend button when manageable --- js/ui/profileModalController.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/js/ui/profileModalController.js b/js/ui/profileModalController.js index d050d2d1..cb4cf64f 100644 --- a/js/ui/profileModalController.js +++ b/js/ui/profileModalController.js @@ -3893,6 +3893,7 @@ export class ProfileModalController { : (value) => (typeof value === "string" ? value : ""); const entriesNeedingFetch = new Set(); + const canRemoveFriends = this.canManageFriendsList(); deduped.forEach(({ hex, label }) => { const item = document.createElement("li"); @@ -3946,7 +3947,7 @@ export class ProfileModalController { actions.appendChild(copyButton); } - if (hex && !usedModerationService) { + if (hex && canRemoveFriends) { const removeButton = this.createRemoveButton({ label: "Unfriend", onRemove: () => this.handleRemoveFriend(hex), @@ -3983,6 +3984,21 @@ export class ProfileModalController { } } + canManageFriendsList() { + if ( + this.moderationService && + (!this.subscriptionsService || + typeof this.subscriptionsService.removeChannel !== "function") + ) { + return false; + } + + return ( + this.subscriptionsService && + typeof this.subscriptionsService.removeChannel === "function" + ); + } + clearFriendsList() { if (this.friendList instanceof HTMLElement) { this.friendList.innerHTML = "";