From f64e74952b3aa18b093fc29fbcca9fe3857d4038 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 3 Jan 2017 20:57:33 -0500 Subject: [PATCH] Allow bookmarks to be sent to 3rd party services with Fever API --- fever/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fever/index.php b/fever/index.php index b1fe0c8..f927159 100644 --- a/fever/index.php +++ b/fever/index.php @@ -4,6 +4,7 @@ require __DIR__.'/../app/common.php'; use Miniflux\Handler; use Miniflux\Model; +use Miniflux\Session\SessionStorage; register_shutdown_function(function () { Miniflux\Helper\write_debug_file(); @@ -36,6 +37,10 @@ function auth() $user = Model\User\get_user_by_token('fever_api_key', $api_key); $authenticated = $user !== null; + if ($authenticated) { + SessionStorage::getInstance()->setUser($user); + } + $response = array( 'api_version' => 3, 'auth' => (int) $authenticated,