Page MenuHomePhabricator

D5466.id.diff
No OneTemporary

D5466.id.diff

diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -50,6 +50,7 @@
relationshipAction,
} = props;
+ const viewerID = useSelector(state => state.currentUserInfo?.id);
const userStoreSearchIndex = useSelector(userStoreSearchIndexSelector);
const [userStoreSearchResults, setUserStoreSearchResults] = React.useState<
$ReadOnlySet<string>,
@@ -106,9 +107,13 @@
() =>
Object.keys(mergedUserInfos)
.map(userID => mergedUserInfos[userID])
- .filter(user => !excludedStatuses.has(user.relationshipStatus))
+ .filter(
+ user =>
+ user.id !== viewerID &&
+ !excludedStatuses.has(user.relationshipStatus),
+ )
.sort((user1, user2) => user1.username.localeCompare(user2.username)),
- [excludedStatuses, mergedUserInfos],
+ [excludedStatuses, mergedUserInfos, viewerID],
);
const [pendingUsersToAdd, setPendingUsersToAdd] = React.useState<

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 7:51 AM (7 m, 26 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2810588
Default Alt Text
D5466.id.diff (1 KB)

Event Timeline