File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
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
99### Deprecated
1010### Removed
1111### Fixed
12+ - ` sendToActiveChats ` now works correctly for any valid Request action.
1213### Security
1314
1415## [ 0.54.0] - 2018-07-21
Original file line number Diff line number Diff line change @@ -603,17 +603,15 @@ public static function sendToActiveChats(
603603 array $ data ,
604604 array $ select_chats_params
605605 ) {
606- if (!method_exists (Request::class, $ callback_function )) {
607- throw new TelegramException ('Method " ' . $ callback_function . '" not found in class Request. ' );
608- }
606+ self ::ensureValidAction ($ callback_function );
609607
610608 $ chats = DB ::selectChats ($ select_chats_params );
611609
612610 $ results = [];
613611 if (is_array ($ chats )) {
614612 foreach ($ chats as $ row ) {
615613 $ data ['chat_id ' ] = $ row ['chat_id ' ];
616- $ results [] = call_user_func (Request::class . ' :: ' . $ callback_function , $ data );
614+ $ results [] = self :: send ( $ callback_function , $ data );
617615 }
618616 }
619617
You can’t perform that action at this time.
0 commit comments