File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 6
6
use App \Status ;
7
7
use Cache ;
8
8
use Illuminate \Support \Str ;
9
+ use App \Services \NotificationService ;
9
10
use App \Services \StatusService ;
10
11
use App \Jobs \ReportPipeline \AutospamNotifyAdminViaEmail ;
12
+ use App \Notification ;
11
13
12
14
class Bouncer {
13
15
@@ -140,6 +142,15 @@ protected function handle($status)
140
142
// $status->is_nsfw = true;
141
143
$ status ->save ();
142
144
145
+ $ notification = new Notification ();
146
+ $ notification ->profile_id = $ status ->profile_id ;
147
+ $ notification ->actor_id = $ status ->profile_id ;
148
+ $ notification ->action = 'autospam.warning ' ;
149
+ $ notification ->item_id = $ status ->id ;
150
+ $ notification ->item_type = "App\Status " ;
151
+ $ notification ->save ();
152
+ NotificationService::add ($ notification ->profile_id , $ notification ->id );
153
+
143
154
StatusService::del ($ status ->id );
144
155
145
156
Cache::forget ('pf:bouncer_v0:exemption_by_pid: ' . $ status ->profile_id );
You can’t perform that action at this time.
0 commit comments