mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 05:26:59 +00:00
chore: lessen restrictions on interacting with bot users as owner
This commit is contained in:
@@ -53,6 +53,12 @@ impl PermissionQuery for DatabasePermissionQuery<'_> {
|
||||
if let Some(other_user) = &self.user {
|
||||
if self.perspective.id == other_user.id {
|
||||
return RelationshipStatus::User;
|
||||
} else if let Some(bot) = &other_user.bot {
|
||||
// For the purposes of permissions checks,
|
||||
// assume owner is the same as bot
|
||||
if self.perspective.id == bot.owner {
|
||||
return RelationshipStatus::User;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(relations) = &self.perspective.relations {
|
||||
|
||||
Reference in New Issue
Block a user