Correctly select channels when requested using DB::selectChats()

parent 68d0cd9f
......@@ -11,6 +11,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Removed
### Fixed
- Ensure named SQL statement parameters are unique.
- Channel selection when using `DB::selectChats()`.
### Security
## [0.48.0] - 2017-08-26
......
......@@ -988,7 +988,7 @@ class DB
'text' => null,
], $select_chats_params);
if (!$select['groups'] && !$select['users'] && !$select['supergroups']) {
if (!$select['groups'] && !$select['users'] && !$select['supergroups'] && !$select['channels']) {
return false;
}
......@@ -1015,7 +1015,7 @@ class DB
$where = [];
$tokens = [];
if (!$select['groups'] || !$select['users'] || !$select['supergroups']) {
if (!$select['groups'] || !$select['users'] || !$select['supergroups'] || !$select['channels']) {
$chat_or_user = [];
$select['groups'] && $chat_or_user[] = TB_CHAT . '.`type` = "group"';
......
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