mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-26 17:10:57 -05:00
Remove ability to add bot as a friend.
This commit is contained in:
parent
f548d91a7c
commit
c5a36b09d9
2 changed files with 60 additions and 55 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue