Unverified Commit f7650364 authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge branch 'develop' into getupdates_without_db

parents bee3a3ee cba0cf23
...@@ -17,6 +17,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ...@@ -17,6 +17,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Removed ### Removed
### Fixed ### Fixed
- PHPCS fixes for updated CodeSniffer dependency. - PHPCS fixes for updated CodeSniffer dependency.
- Send messages correctly via `/sendtochannel`.
### Security ### Security
## [0.52.0] - 2018-01-07 ## [0.52.0] - 2018-01-07
......
...@@ -290,13 +290,7 @@ class SendtochannelCommand extends AdminCommand ...@@ -290,13 +290,7 @@ class SendtochannelCommand extends AdminCommand
$data['longitude'] = $message->getLocation()->getLongitude(); $data['longitude'] = $message->getLocation()->getLongitude();
} }
$callback_path = 'Longman\TelegramBot\Request'; return Request::send('send' . ucfirst($type), $data);
$callback_function = 'send' . ucfirst($type);
if (!method_exists($callback_path, $callback_function)) {
throw new TelegramException('Methods: ' . $callback_function . ' not found in class Request.');
}
return $callback_path::$callback_function($data);
} }
/** /**
......
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