forked from GNUsocial/gnu-social
Handle private streams better (failed to show profile before)
This commit is contained in:
@@ -761,6 +761,17 @@ class Profile extends Managed_DataObject
|
||||
return Subscription::exists($this, $other);
|
||||
}
|
||||
|
||||
function readableBy(Profile $other=null)
|
||||
{
|
||||
// If it's not a private stream, it's readable by anyone
|
||||
if (!$this->isPrivateStream()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If it's a private stream, $other must be a subscriber to $this
|
||||
return is_null($other) ? false : $other->isSubscribed($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a pending subscription request is outstanding for this...
|
||||
*
|
||||
|
Reference in New Issue
Block a user