Skip to content

Commit

Permalink
Allow OC bots to be promoted to owner (#6869)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Nov 21, 2024
1 parent e695ef8 commit 94f5bed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/canisters/community/impl/src/model/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl CommunityMembers {
return ChangeRoleResult::Invalid;
}
// It is not currently possible to make a bot an owner
if member.user_type.is_bot() && new_role.is_owner() {
if member.user_type == UserType::Bot && new_role.is_owner() {
return ChangeRoleResult::Invalid;
}

Expand Down
2 changes: 1 addition & 1 deletion backend/libraries/group_chat_core/src/members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl GroupMembers {
return ChangeRoleResult::Invalid;
}
// It is not currently possible to make a bot an owner
if member.user_type.is_bot() && new_role.is_owner() {
if member.user_type == UserType::Bot && new_role.is_owner() {
return ChangeRoleResult::Invalid;
}

Expand Down

0 comments on commit 94f5bed

Please sign in to comment.