Skip to content

Commit

Permalink
Command fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
itorgov committed Jan 27, 2019
1 parent 172bded commit f3dca6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function telegram(TelegramRequest $request)
{
// Execute a first command.
if ($request->commands->isNotEmpty()) {
$jobClassName = '\\App\\Jobs\\Telegram\\' . studly_case(str_after($request->commands->first(), '/')) . 'Job';
$jobClassName = '\\App\\Jobs\\Telegram\\' . studly_case(str_before(str_after($request->commands->first(), '/'), '@')) . 'Job';

if (class_exists($jobClassName)) {
dispatch(new $jobClassName(request('message')));
Expand Down

0 comments on commit f3dca6f

Please sign in to comment.