mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 17:35:28 +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} />
|
<Edit size={28} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
{(user.relationship === RelationshipStatus.Incoming ||
|
{!user.bot &&
|
||||||
user.relationship === RelationshipStatus.None) && (
|
(user.relationship ===
|
||||||
|
RelationshipStatus.Incoming ||
|
||||||
|
user.relationship ===
|
||||||
|
RelationshipStatus.None) && (
|
||||||
<IconButton onClick={() => user.addFriend()}>
|
<IconButton onClick={() => user.addFriend()}>
|
||||||
<UserPlus size={28} />
|
<UserPlus size={28} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|||||||
@@ -585,6 +585,7 @@ function ContextMenus(props: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
|
if (!user.bot) {
|
||||||
let actions: Action["action"][];
|
let actions: Action["action"][];
|
||||||
switch (user.relationship) {
|
switch (user.relationship) {
|
||||||
case RelationshipStatus.User:
|
case RelationshipStatus.User:
|
||||||
@@ -639,6 +640,7 @@ function ContextMenus(props: Props) {
|
|||||||
} as unknown as Action);
|
} as unknown as Action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (contextualChannel) {
|
if (contextualChannel) {
|
||||||
if (contextualChannel.channel_type === "Group" && uid) {
|
if (contextualChannel.channel_type === "Group" && uid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user