Page MenuHomePhabricator

D5466.id17860.diff
No OneTemporary

D5466.id17860.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
Fri, Jan 10, 3:37 AM (13 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2844264
Default Alt Text
D5466.id17860.diff (1 KB)

Event Timeline