Commit 77b65498 authored by thomas craipeau's avatar thomas craipeau
Browse files

merge dev-merge > yii2-only-merge

parents 48e5e28a 57530a5c
......@@ -799,8 +799,8 @@ class News {
public static function addParamsForNewsFromActivitypub($type, $id, $params){
$connectedUserId = Yii::get('session')["userId"];
$connectedUser = $connectedUserId ? Person::getById($connectedUserId) : null;
$activitypubEnable = isset($connectedUser["preferences"]) ? Preference::isActivitypubActivate($connectedUser["preferences"]) : false;
$connectedUser = Person::getById($connectedUserId);
$activitypubEnable = Preference::isActivitypubActivate(@$connectedUser["preferences"]);
if($type == Person::COLLECTION && $id == $connectedUserId && $activitypubEnable){
$activitypubParams = ["type" => "activitypub"];
......
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