namespace Friendica\Module\Item;
use Friendica\BaseModule;
-use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\DI;
use Friendica\Model\Item;
{
$l10n = DI::l10n();
- if (!Session::isAuthenticated()) {
+ if (!DI::userSession()->isAuthenticated()) {
throw new HttpException\ForbiddenException($l10n->t('Access denied.'));
}
$itemId = intval($this->parameters['id']);
- if (!Item::performActivity($itemId, 'follow', Session::getLocalUser())) {
+ if (!Item::performActivity($itemId, 'follow', DI::userSession()->getLocalUserId())) {
throw new HTTPException\BadRequestException($l10n->t('Unable to follow this item.'));
}