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 @@ -14,6 +14,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1414### Deprecated
1515### Removed
1616### Fixed
17+ - ` sendToActiveChats ` now works correctly for any valid Request action.
1718### Security
1819
1920## [ 0.54.0] - 2018-07-21
Original file line number Diff line number Diff line change @@ -605,17 +605,15 @@ public static function sendToActiveChats(
605605 array $ data ,
606606 array $ select_chats_params
607607 ) {
608- if (!method_exists (Request::class, $ callback_function )) {
609- throw new TelegramException ('Method " ' . $ callback_function . '" not found in class Request. ' );
610- }
608+ self ::ensureValidAction ($ callback_function );
611609
612610 $ chats = DB ::selectChats ($ select_chats_params );
613611
614612 $ results = [];
615613 if (is_array ($ chats )) {
616614 foreach ($ chats as $ row ) {
617615 $ data ['chat_id ' ] = $ row ['chat_id ' ];
618- $ results [] = call_user_func (Request::class . ' :: ' . $ callback_function , $ data );
616+ $ results [] = self :: send ( $ callback_function , $ data );
619617 }
620618 }
621619
You can’t perform that action at this time.
0 commit comments