Skip to content

Commit ffcb4bb

Browse files
authored
fix: remove unneeded arg (#37)
1 parent 7ae506d commit ffcb4bb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Jobs/SendNotificationWhenFollowerPosted.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ class SendNotificationWhenFollowerPosted implements ShouldQueue
3333

3434
protected $lastPostNumber;
3535

36-
public function __construct(Post $post, int $lastPostNumber)
36+
public function __construct(Post $post)
3737
{
3838
$this->post = $post;
39-
$this->lastPostNumber = $lastPostNumber;
4039
}
4140

4241
public function handle(NotificationSyncer $notifications)

src/Listeners/QueueNotificationJobs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function whenPostCreated(PostSaving $event)
7575
}
7676

7777
resolve('flarum.queue.connection')->push(
78-
new Jobs\SendNotificationWhenFollowerPosted($post, $post->discussion->last_post_number)
78+
new Jobs\SendNotificationWhenFollowerPosted($post)
7979
);
8080
});
8181
}
@@ -89,7 +89,7 @@ public function whenPostApproved(PostWasApproved $event)
8989
$this->queue->push(
9090
$event->post->number === 1
9191
? new Jobs\SendNotificationWhenDiscussionIsStarted($event->post->discussion)
92-
: new Jobs\SendNotificationWhenFollowerPosted($event->post, $event->post->number - 1)
92+
: new Jobs\SendNotificationWhenFollowerPosted($event->post)
9393
);
9494
}
9595
}

0 commit comments

Comments
 (0)