mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-22 15: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} />
|
||||
</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) {
|
||||
|
|
Loading…
Reference in a new issue