Page MenuHomePhabricator

D13542.diff
No OneTemporary

D13542.diff

diff --git a/lib/shared/search-utils.js b/lib/shared/search-utils.js
--- a/lib/shared/search-utils.js
+++ b/lib/shared/search-utils.js
@@ -246,6 +246,7 @@
userInfos,
]);
+ const viewerID = useSelector(state => state.currentUserInfo?.id);
const sortedMembers = React.useMemo(() => {
const nonFriends = [];
const blockedUsers = [];
@@ -314,7 +315,8 @@
}
} else if (
!containingThreadInfo &&
- relationshipStatus !== userRelationshipStatus.FRIEND
+ relationshipStatus !== userRelationshipStatus.FRIEND &&
+ result.id !== viewerID
) {
notice = notFriendNotice;
alert = {
@@ -336,7 +338,13 @@
return result;
},
);
- }, [containingThreadInfo, filteredUserResults, parentThreadInfo, threadType]);
+ }, [
+ containingThreadInfo,
+ filteredUserResults,
+ parentThreadInfo,
+ threadType,
+ viewerID,
+ ]);
return sortedMembers;
}

File Metadata

Mime Type
text/plain
Expires
Wed, Oct 2, 2:21 PM (18 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2213703
Default Alt Text
D13542.diff (979 B)

Event Timeline