From e52e6f7be2c79410ca59378277506f9fe839794c Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 12 Jun 2019 09:07:30 +0000 Subject: [PATCH] And another good library --- blockbot/blockbot.php | 2 +- twitter/twitter.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php index e6ca6840..0a73b6e1 100644 --- a/blockbot/blockbot.php +++ b/blockbot/blockbot.php @@ -70,7 +70,7 @@ function blockbot_init_1(App $a) { 'Python-urllib/', 'Liferea/', 'aiohttp/', 'WordPress.com Reader', 'hackney/', 'Faraday v', 'okhttp', 'UniversalFeedParser', 'PixelFedBot', 'python-requests', 'WordPress/', 'http.rb/', 'Apache-HttpClient/', 'WordPress.com;', 'Pleroma', - 'Dispatch/', 'Ruby', 'Uptimebot/', 'Java/']; + 'Dispatch/', 'Ruby', 'Uptimebot/', 'Java/', 'libwww-perl/']; foreach ($agents as $agent) { if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) { diff --git a/twitter/twitter.php b/twitter/twitter.php index 40656918..33ee3e1e 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -575,7 +575,7 @@ function twitter_post_hook(App $a, array &$b) return; } - Logger::log('twitter post invoked'); + Logger::notice('twitter post invoked', ['id' => $b['id'], 'guid' => $b['guid']]); PConfig::load($b['uid'], 'twitter'); @@ -610,6 +610,7 @@ function twitter_post_hook(App $a, array &$b) $b['body'] = twitter_update_mentions($b['body']); $msgarr = ItemContent::getPlaintextPost($b, $max_char, true, 8); + Logger::info('Got plaintext', $msgarr); $msg = $msgarr["text"]; if (($msg == "") && isset($msgarr["title"])) {