fix use of activity rather than act in salmonaction subclasses, too
This commit is contained in:
parent
54b93aede6
commit
5110275a38
|
@ -61,7 +61,7 @@ class GroupsalmonAction extends SalmonAction
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
// @fixme process all objects?
|
// @fixme process all objects?
|
||||||
switch ($this->act->objects[0]->type) {
|
switch ($this->activity->objects[0]->type) {
|
||||||
case ActivityObject::ARTICLE:
|
case ActivityObject::ARTICLE:
|
||||||
case ActivityObject::BLOGENTRY:
|
case ActivityObject::BLOGENTRY:
|
||||||
case ActivityObject::NOTE:
|
case ActivityObject::NOTE:
|
||||||
|
@ -74,7 +74,7 @@ class GroupsalmonAction extends SalmonAction
|
||||||
|
|
||||||
// Notice must be to the attention of this group
|
// Notice must be to the attention of this group
|
||||||
|
|
||||||
$context = $this->act->context;
|
$context = $this->activity->context;
|
||||||
|
|
||||||
if (empty($context->attention)) {
|
if (empty($context->attention)) {
|
||||||
throw new ClientException("Not to the attention of anyone.");
|
throw new ClientException("Not to the attention of anyone.");
|
||||||
|
|
|
@ -55,10 +55,10 @@ class UsersalmonAction extends SalmonAction
|
||||||
*/
|
*/
|
||||||
function handlePost()
|
function handlePost()
|
||||||
{
|
{
|
||||||
common_log(LOG_INFO, "Received post of '{$this->act->objects[0]->id}' from '{$this->act->actor->id}'");
|
common_log(LOG_INFO, "Received post of '{$this->activity->objects[0]->id}' from '{$this->activity->actor->id}'");
|
||||||
|
|
||||||
// @fixme: process all activity objects?
|
// @fixme: process all activity objects?
|
||||||
switch ($this->act->objects[0]->type) {
|
switch ($this->activity->objects[0]->type) {
|
||||||
case ActivityObject::ARTICLE:
|
case ActivityObject::ARTICLE:
|
||||||
case ActivityObject::BLOGENTRY:
|
case ActivityObject::BLOGENTRY:
|
||||||
case ActivityObject::NOTE:
|
case ActivityObject::NOTE:
|
||||||
|
@ -72,7 +72,7 @@ class UsersalmonAction extends SalmonAction
|
||||||
// Notice must either be a) in reply to a notice by this user
|
// Notice must either be a) in reply to a notice by this user
|
||||||
// or b) to the attention of this user
|
// or b) to the attention of this user
|
||||||
|
|
||||||
$context = $this->act->context;
|
$context = $this->activity->context;
|
||||||
|
|
||||||
if (!empty($context->replyToID)) {
|
if (!empty($context->replyToID)) {
|
||||||
$notice = Notice::staticGet('uri', $context->replyToID);
|
$notice = Notice::staticGet('uri', $context->replyToID);
|
||||||
|
@ -92,7 +92,7 @@ class UsersalmonAction extends SalmonAction
|
||||||
throw new ClientException("Not to anyone in reply to anything!");
|
throw new ClientException("Not to anyone in reply to anything!");
|
||||||
}
|
}
|
||||||
|
|
||||||
$existing = Notice::staticGet('uri', $this->act->objects[0]->id);
|
$existing = Notice::staticGet('uri', $this->activity->objects[0]->id);
|
||||||
|
|
||||||
if (!empty($existing)) {
|
if (!empty($existing)) {
|
||||||
common_log(LOG_ERR, "Not saving notice '{$existing->uri}'; already exists.");
|
common_log(LOG_ERR, "Not saving notice '{$existing->uri}'; already exists.");
|
||||||
|
@ -143,7 +143,7 @@ class UsersalmonAction extends SalmonAction
|
||||||
|
|
||||||
function handleFavorite()
|
function handleFavorite()
|
||||||
{
|
{
|
||||||
$notice = $this->getNotice($this->act->objects[0]);
|
$notice = $this->getNotice($this->activity->objects[0]);
|
||||||
$profile = $this->ensureProfile()->localProfile();
|
$profile = $this->ensureProfile()->localProfile();
|
||||||
|
|
||||||
$old = Fave::pkeyGet(array('user_id' => $profile->id,
|
$old = Fave::pkeyGet(array('user_id' => $profile->id,
|
||||||
|
@ -164,7 +164,7 @@ class UsersalmonAction extends SalmonAction
|
||||||
*/
|
*/
|
||||||
function handleUnfavorite()
|
function handleUnfavorite()
|
||||||
{
|
{
|
||||||
$notice = $this->getNotice($this->act->objects[0]);
|
$notice = $this->getNotice($this->activity->objects[0]);
|
||||||
$profile = $this->ensureProfile()->localProfile();
|
$profile = $this->ensureProfile()->localProfile();
|
||||||
|
|
||||||
$fave = Fave::pkeyGet(array('user_id' => $profile->id,
|
$fave = Fave::pkeyGet(array('user_id' => $profile->id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user