Reworked the ActivityContext->attention structure
Removing Evan's obscure attentionType solution and directly using the attention array
This commit is contained in:
@@ -78,14 +78,13 @@ class GroupsalmonAction extends SalmonAction
|
||||
}
|
||||
|
||||
// Notice must be to the attention of this group
|
||||
$context = $this->activity->context;
|
||||
|
||||
if (empty($context->attention)) {
|
||||
if (empty($this->activity->context->attention)) {
|
||||
// TRANS: Client exception.
|
||||
throw new ClientException("Not to the attention of anyone.");
|
||||
} else {
|
||||
$uri = common_local_url('groupbyid', array('id' => $this->group->id));
|
||||
if (!in_array($uri, $context->attention)) {
|
||||
|
||||
if (!array_key_exists($uri, $this->activity->context->attention)) {
|
||||
// TRANS: Client exception.
|
||||
throw new ClientException("Not to the attention of this group.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user