Team-Tea-Time / laravel-forum

A slim, lean forum package designed for quick and easy integration in Laravel projects
https://laravel-forum.teamteatime.net/
MIT License
601 stars 165 forks source link

UserRestoredPost and UserDeletedPost does not fire #352

Closed aiojoshua closed 1 year ago

aiojoshua commented 1 year ago

Upon adding a set of listeners, I noticed that the TeamTeaTime\Forum\Events\UserDeletedPost and TeamTeaTime\Forum\Events\UserRestoredPost never fires.

In the respective file (eg. https://github.com/Team-Tea-Time/laravel-forum/blob/5.6.0/src/Http/Requests/RestorePost.php) the issue is caused by the following line 29:

if (! $post === null) {

It should be corrected:

if ($post !== null) {

Great package!

Riari commented 1 year ago

Thanks for reporting this!