block check can't be done inside the same try-expression as Subscription::getSubscription(), since if that throws a NoResultException, the block check will not be done. and if you're blocking someone you are not subscribing to them.
这个提交包含在:
父节点
dbdac9cfbe
当前提交
abb8d1273e
@ -274,11 +274,11 @@ class ApiAction extends Action
|
||||
$sub = Subscription::getSubscription($this->scoped, $profile);
|
||||
// Notifications on?
|
||||
$twitter_user['following'] = true;
|
||||
$twitter_user['statusnet_blocking'] = $this->scoped->hasBlocked($profile);
|
||||
$twitter_user['notifications'] = ($sub->jabber || $sub->sms);
|
||||
} catch (NoResultException $e) {
|
||||
// well, the values are already false...
|
||||
}
|
||||
$twitter_user['statusnet_blocking'] = $this->scoped->hasBlocked($profile);
|
||||
}
|
||||
|
||||
if ($get_notice) {
|
||||
@ -1550,4 +1550,4 @@ class ApiAction extends Action
|
||||
|
||||
return $uri;
|
||||
}
|
||||
}
|
||||
}
|
正在加载...
x
在新工单中引用
屏蔽一个用户