diff --git a/bot.php b/bot.php index 1539e72..8f265a0 100644 --- a/bot.php +++ b/bot.php @@ -5,6 +5,7 @@ use Mremi\UrlShortener\Model\Link; use Mremi\UrlShortener\Provider\Bitly\BitlyProvider; use Mremi\UrlShortener\Provider\Bitly\GenericAccessTokenAuthenticator; use Revolution\Mastodon\MastodonClient; +use GuzzleHttp\Client; $config = Yaml::parse(file_get_contents('config.yml')); $lastrun = 0; @@ -85,7 +86,7 @@ $telegram = new Longman\TelegramBot\Telegram( $config['TELEGRAM_API_KEY'], $config['TELEGRAM_BOT_NAME'] ); -$mastodon = new MastodonClient(); +$mastodon = new MastodonClient(new Client); foreach ($articles as $article) { if (strtotime($article['pubDate']) <= $lastrun) {