mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-10 02:25:27 +00:00
Remove ability to add bot as a friend.
This commit is contained in:
@@ -190,8 +190,11 @@ export const UserProfile = observer(
|
||||
<Edit size={28} />
|
||||
</IconButton>
|
||||
)}
|
||||
{(user.relationship === RelationshipStatus.Incoming ||
|
||||
user.relationship === RelationshipStatus.None) && (
|
||||
{!user.bot &&
|
||||
(user.relationship ===
|
||||
RelationshipStatus.Incoming ||
|
||||
user.relationship ===
|
||||
RelationshipStatus.None) && (
|
||||
<IconButton onClick={() => user.addFriend()}>
|
||||
<UserPlus size={28} />
|
||||
</IconButton>
|
||||
|
||||
@@ -585,6 +585,7 @@ function ContextMenus(props: Props) {
|
||||
}
|
||||
|
||||
if (user) {
|
||||
if (!user.bot) {
|
||||
let actions: Action["action"][];
|
||||
switch (user.relationship) {
|
||||
case RelationshipStatus.User:
|
||||
@@ -639,6 +640,7 @@ function ContextMenus(props: Props) {
|
||||
} as unknown as Action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (contextualChannel) {
|
||||
if (contextualChannel.channel_type === "Group" && uid) {
|
||||
|
||||
Reference in New Issue
Block a user