From c93e6a5b7761a0ed947b6f3e688c9e20557684bf Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Wed, 6 Jun 2018 15:08:52 +0700 Subject: [PATCH] create masto client with guzzle client --- bot.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {