Fix and prettier incoming changes from PR #119.

Cherry pick PR #130: don't show add friend button on banned / deleted accounts.
Also account for this in context menu.
This commit is contained in:
Paul
2021-09-03 10:43:48 +01:00
parent a08ad7aa0b
commit a1cb72046c
3 changed files with 34 additions and 14 deletions

View File

@@ -619,7 +619,14 @@ function ContextMenus(props: Props) {
break;
case RelationshipStatus.None:
default:
actions = ["add_friend", "block_user"];
if (
(user.flags && 2) ||
(user.flags && 4)
) {
actions = ["block_user"];
} else {
actions = ["add_friend", "block_user"];
}
}
if (userPermissions & UserPermission.ViewProfile) {