Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Fixed getCommand() method in Message object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasss93 committed Sep 17, 2017
1 parent 63b03c4 commit ab9eeda
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.6.2]
### Fixed
- Fixed `getCommand()` method in Message object.

## [1.6.1]
### Changed
- Now `getCommand()` method in Message object return `null` if `text` property isn't a command.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Framework for Telegram Bot API",
"license": "MIT",
"type": "project",
"version": "1.6.1",
"version": "1.6.2",
"authors": [
{
"name": "Luca Patera",
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,6 @@ Changelog
All notable changes to this project will be documented [here](https://github.com/Lukasss93/telegrambot-php/blob/master/CHANGELOG.md).

### Recent changes
## [1.6.1]
### Changed
- Now `getCommand()` method in Message object return `null` if `text` property isn't a command.
## [1.6.2]
### Fixed
- Fixed `getCommand()` method in Message object.
2 changes: 1 addition & 1 deletion src/Types/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function getCommand()
{
if($this->text!==null)
{
$result=preg_match('/^(\/\w+)@\w+$/',$this->text,$matches);
$result=preg_match('/^(\/\w+)(@\w+)?$/',$this->text,$matches);

if(!$result)
{
Expand Down

0 comments on commit ab9eeda

Please sign in to comment.