Skip to content

Commit 9f87430

Browse files
authored
Handle additional RPCErrorException cases
1 parent 0a30395 commit 9f87430

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/BroadcastManager.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ public function broadcastWithProgress(
218218

219219
} catch (\danog\MadelineProto\RPCErrorException $e) {
220220
unset($state['inFlight'][$peer]);
221+
222+
if ($e->rpc === 'INPUT_USER_DEACTIVATED' ||
223+
$e->rpc === 'USER_IS_BOT' ||
224+
$e->rpc === 'CHAT_WRITE_FORBIDDEN' ||
225+
$e->rpc === 'USER_IS_BLOCKED' ||
226+
$e->rpc === 'PEER_ID_INVALID') {
227+
$state['failed']++;
228+
continue;
229+
}
230+
221231
if (preg_match('/FLOOD_WAIT_(\d+)/',$e->getMessage(),$m)) {
222232
$job['attempts']++;
223233
$job['availableAt']=microtime(true)+(int)$m[1];

0 commit comments

Comments
 (0)