mirror of
https://gitlab.com/ifiction/ifhub-telegram.git
synced 2024-10-22 22:15:31 +00:00
create masto client with guzzle client
This commit is contained in:
parent
39fd146cec
commit
c93e6a5b77
1 changed files with 2 additions and 1 deletions
3
bot.php
3
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) {
|
||||
|
|
Loading…
Reference in a new issue