when silencing, blow scope for not-logged-in users
This commit is contained in:
parent
7bb59ad2a1
commit
04f71a42d3
@ -1139,11 +1139,20 @@ class Profile extends Managed_DataObject
|
|||||||
function silence()
|
function silence()
|
||||||
{
|
{
|
||||||
$this->grantRole(Profile_role::SILENCED);
|
$this->grantRole(Profile_role::SILENCED);
|
||||||
|
$this->blowRecentNoticeScope();
|
||||||
}
|
}
|
||||||
|
|
||||||
function unsilence()
|
function unsilence()
|
||||||
{
|
{
|
||||||
$this->revokeRole(Profile_role::SILENCED);
|
$this->revokeRole(Profile_role::SILENCED);
|
||||||
|
$this->blowRecentNoticeScope();
|
||||||
|
}
|
||||||
|
|
||||||
|
function blowRecentNoticeScope() {
|
||||||
|
$notice = $this->getNotices(0, CachingNoticeStream::CACHE_WINDOW);
|
||||||
|
while ($notice->fetch()) {
|
||||||
|
self::blow(sprintf('notice:in-scope-for:%d:null', $notice->id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user