Skip to content

Commit b1ffa4b

Browse files
authored
Merge pull request #14 from WizardLoop/dev
# [3.0.1] - 2026-01-11 # Fixed: lastBroadcastData
2 parents e7cc936 + cefa359 commit b1ffa4b

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,13 @@ Added functionality to send initial status messages when gathering peers and sta
124124
### Fixed:
125125
* Better error handling for missing files or blocked users.
126126
* Proper cleanup of message files after deletion.
127+
128+
---
129+
130+
## [3.0.1] - 2026-01-11
131+
132+
### Fixed:
133+
134+
* lastBroadcastData
135+
136+
---

src/BroadcastManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ public function broadcastWithProgress(
268268
($state['cancel'] ? "🛑 <b>Cancelled</b>" : "✅ <b>Finished</b>");
269269

270270
try { $api->messages->editMessage(['peer'=>$chatId,'id'=>$statusId,'message'=>$finalText,'parse_mode'=>'HTML']); } catch (\Throwable) {}
271-
try { \Amp\File\write(__DIR__.'/data/LastBrodDATA.txt',$finalText); } catch (\Throwable) {}
271+
$dir1=__DIR__."/data";
272+
if(!is_dir($dir1))@mkdir($dir1,0777,true);
273+
try { \Amp\File\write(__DIR__."$dir1/LastBrodDATA.txt",$finalText); } catch (\Throwable) {}
272274

273275
foreach ($state['lastMessageIds'] as $peer=>$id) {
274276
$dir=__DIR__."/data/$peer";

0 commit comments

Comments
 (0)