Commit 8745eecd authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #342 from jacklul/botan-monolog

Botan integration - quick improvements
parents 7d38e1e5 516cd7a2
......@@ -110,6 +110,15 @@ class Botan
}
}
}
} elseif (isset($obj['edited_message'])) {
$data = $obj['edited_message'];
$event_name = 'Edited Message';
} elseif (isset($obj['channel_post'])) {
$data = $obj['channel_post'];
$event_name = 'Channel Message';
} elseif (isset($obj['edited_channel_post'])) {
$data = $obj['edited_channel_post'];
$event_name = 'Edited Channel Message';
} elseif (isset($obj['inline_query'])) {
$data = $obj['inline_query'];
$event_name = 'Inline Query';
......@@ -146,7 +155,7 @@ class Botan
$responseData = json_decode($response, true);
if ($responseData['status'] !== 'accepted') {
error_log('Botan.io API replied with error: ' . $response);
TelegramLog::debug('Botan.io API replied with error: ' . $response);
}
return $responseData;
......@@ -195,9 +204,7 @@ class Botan
if (!filter_var($response, FILTER_VALIDATE_URL) === false) {
BotanDB::insertShortUrl($user_id, $url, $response);
} else {
// @TODO: Add telegram log
error_log('Botan.io API replied with error: ' . $response);
TelegramLog::debug('Botan.io API replied with error: ' . $response);
return $url;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment