mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-08-31 01:20:30 +00:00
fix: send relationship info for bots (#935)
* fix: send relationship info for bots Signed-off-by: Zomatree <me@zomatree.live> * fix: dont allow bots to block users Signed-off-by: Zomatree <me@zomatree.live> * fix: always allow users to view bot's profile Signed-off-by: Zomatree <me@zomatree.live> --------- Signed-off-by: Zomatree <me@zomatree.live>
This commit is contained in:
@@ -1045,9 +1045,7 @@ impl crate::User {
|
||||
P: Into<Option<&'a crate::User>>,
|
||||
{
|
||||
let perspective = perspective.into();
|
||||
let (relationship, can_see_profile) = if self.bot.is_some() {
|
||||
(RelationshipStatus::None, true)
|
||||
} else if let Some(perspective) = perspective {
|
||||
let (relationship, can_see_profile) = if let Some(perspective) = perspective {
|
||||
let mut query = DatabasePermissionQuery::new(db, perspective).user(&self);
|
||||
|
||||
if perspective.id == self.id {
|
||||
@@ -1126,9 +1124,7 @@ impl crate::User {
|
||||
P: Into<Option<&'a crate::User>>,
|
||||
{
|
||||
let perspective = perspective.into();
|
||||
let (relationship, can_see_profile) = if self.bot.is_some() {
|
||||
(RelationshipStatus::None, true)
|
||||
} else if let Some(perspective) = perspective {
|
||||
let (relationship, can_see_profile) = if let Some(perspective) = perspective {
|
||||
if perspective.id == self.id {
|
||||
(RelationshipStatus::User, true)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user