Commit 32bd207d authored by Yorre Rajaonarivelo's avatar Yorre Rajaonarivelo
Browse files

hot fix and handle link interaction

parent 9dd94e49
......@@ -6,6 +6,7 @@ use News;
use Person;
use PixelHumain\PixelHumain\modules\citizenToolKit\components\activitypub\handlers\Handler;
use PixelHumain\PixelHumain\modules\citizenToolKit\models\activitypub\Activitypub;
use PixelHumain\PixelHumain\modules\citizenToolKit\models\activitypub\ActivitypubActivityCreator;
use Rest;
use Yii;
......@@ -19,7 +20,7 @@ class DeleteAction extends \PixelHumain\PixelHumain\components\Action {
return Rest::json( $res );
} else {
$res = News::delete($id, Yii::app()->session["userId"], true);
if($activity = Activitypub::createDeleteNoteActivity($id))
if($activity = ActivitypubActivityCreator::createDeleteNoteActivity($id))
Handler::handle($activity);
if(@$res["newsUp"] && $_POST["isLive"]){
......
......@@ -5,7 +5,7 @@ use CAction;
use News;
use Person;
use PixelHumain\PixelHumain\modules\citizenToolKit\components\activitypub\handlers\Handler;
use PixelHumain\PixelHumain\modules\citizenToolKit\models\activitypub\Activitypub;
use PixelHumain\PixelHumain\modules\citizenToolKit\models\activitypub\ActivitypubActivityCreator;
use Preference;
use Rest;
use Yii;
......@@ -21,7 +21,7 @@ class SaveAction extends \PixelHumain\PixelHumain\components\Action
$user = Person::getById(Yii::app()->session["userId"]);
if(Preference::isActivitypubActivate($user["preferences"]))
Handler::handle(Activitypub::createNoteActivity($_POST), ["newsId"=>(string)$result["object"]["_id"]]);
Handler::handle(ActivitypubActivityCreator::createNoteActivity($_POST), ["newsId"=>(string)$result["object"]["_id"]]);
if(!@$_REQUEST["json"]){
$params=array(
......
......@@ -5,6 +5,7 @@ use CAction;
use News;
use PixelHumain\PixelHumain\modules\citizenToolKit\components\activitypub\handlers\Handler;
use PixelHumain\PixelHumain\modules\citizenToolKit\models\activitypub\Activitypub;
use PixelHumain\PixelHumain\modules\citizenToolKit\models\activitypub\ActivitypubActivityCreator;
use Rest;
class UpdateAction extends \PixelHumain\PixelHumain\components\Action
......@@ -15,7 +16,7 @@ class UpdateAction extends \PixelHumain\PixelHumain\components\Action
$result=News::update($_POST);
//federation de l'activité
if($activity = Activitypub::createUpdateNoteActivity($_POST)){
if($activity = ActivitypubActivityCreator::createUpdateNoteActivity($_POST)){
Handler::handle($activity);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment