Reworked the ActivityContext->attention structure

Removing Evan's obscure attentionType solution and directly using the attention array
This commit is contained in:
Mikael Nordfeldth
2013-10-28 22:21:14 +01:00
parent f99c4b7f07
commit 23a6b4595f
12 changed files with 63 additions and 76 deletions

View File

@@ -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.");
}