Return correct message type.

Fix #911
parent 5bec1827
...@@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c ...@@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Deprecated ### Deprecated
### Removed ### Removed
### Fixed ### Fixed
- Return correct message type.
### Security ### Security
## [0.55.0] - 2018-12-20 ## [0.55.0] - 2018-12-20
......
...@@ -313,7 +313,7 @@ class Message extends Entity ...@@ -313,7 +313,7 @@ class Message extends Entity
$is_command = strlen($this->getCommand()) > 0; $is_command = strlen($this->getCommand()) > 0;
foreach ($types as $type) { foreach ($types as $type) {
if ($this->getProperty($type)) { if ($this->getProperty($type) !== null) {
if ($is_command && $type === 'text') { if ($is_command && $type === 'text') {
return 'command'; return 'command';
} }
......
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