Deletes now federated. But might not be handled properly

This commit is contained in:
Mikael Nordfeldth
2015-10-03 14:39:49 +02:00
parent db9f68e651
commit 7c68537b06
3 changed files with 39 additions and 7 deletions

View File

@@ -96,7 +96,7 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
$deleted->id = $target->getID();
$deleted->profile_id = $target->getProfile()->getID();
$deleted->uri = Deleted_notice::newUri($target->getProfile(), $target);
$deleted->uri = $act->id;
$deleted->act_uri = $target->getUri();
$deleted->act_created = $target->created;
$deleted->created = common_sql_now();
@@ -112,6 +112,25 @@ class ActivityModerationPlugin extends ActivityVerbHandlerPlugin
return $deleted;
}
// FIXME: Put this in lib/activityhandlerplugin.php when we're ready
// with the other microapps/activityhandlers as well.
// Also it should be StartNoticeAsActivity (with a prepped Activity, including ->context etc.)
public function onEndNoticeAsActivity(Notice $stored, Activity $act, Profile $scoped=null)
{
if (!$this->isMyNotice($stored)) {
return true;
}
common_debug('Extending activity '.$stored->id.' with '.get_called_class());
$this->extendActivity($stored, $act, $scoped);
return false;
}
public function extendActivity(Notice $stored, Activity $act, Profile $scoped=null)
{
Deleted_notice::extendActivity($stored, $act, $scoped);
}
public function activityObjectFromNotice(Notice $notice)
{
$object = Deleted_notice::fromStored($notice);