Skip to content

Commit 8a44fe9

Browse files
authored
Merge pull request #18 from WizardLoop/dev
[3.0.5] Handle additional RPCErrorException cases
2 parents 31090e0 + 8d36d79 commit 8a44fe9

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,11 @@ Added functionality to send initial status messages when gathering peers and sta
157157

158158
* Extracted peer filtering from broadcast execution
159159
* Reduced unnecessary processing during broadcasts
160+
161+
---
162+
163+
## [3.0.5] - 2026-01-18
164+
165+
### Added & Fixed:
166+
167+
* Handle additional RPCErrorException cases

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)