File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
9
9
### Added
10
10
- Bot API 4.5 (Unique file IDs, MarkdownV2). (#1046 )
11
11
- Chain the exception thrown when getting commands from path. (#1030 )
12
+ - Support ` language_code ` in ` DB::selectChats() ` for filtering the chats selection.
12
13
### Changed
13
14
- Save notes an unescaped JSON, to allow easy DB reading and editing of values. (#1005 )
14
15
### Deprecated
Original file line number Diff line number Diff line change @@ -1093,6 +1093,7 @@ public static function selectChats($select_chats_params)
1093
1093
'date_to ' => null ,
1094
1094
'chat_id ' => null ,
1095
1095
'text ' => null ,
1096
+ 'language ' => null ,
1096
1097
], $ select_chats_params );
1097
1098
1098
1099
if (!$ select ['groups ' ] && !$ select ['users ' ] && !$ select ['supergroups ' ] && !$ select ['channels ' ]) {
@@ -1148,6 +1149,11 @@ public static function selectChats($select_chats_params)
1148
1149
$ tokens [':chat_id ' ] = $ select ['chat_id ' ];
1149
1150
}
1150
1151
1152
+ if ($ select ['users ' ] && null !== $ select ['language ' ]) {
1153
+ $ where [] = TB_USER . '.`language_code` = :language ' ;
1154
+ $ tokens [':language ' ] = $ select ['language ' ];
1155
+ }
1156
+
1151
1157
if (null !== $ select ['text ' ]) {
1152
1158
$ text_like = '% ' . strtolower ($ select ['text ' ]) . '% ' ;
1153
1159
if ($ select ['users ' ]) {
You can’t perform that action at this time.
0 commit comments