diff --git a/app/Http/Controllers/NotificationsController.php b/app/Http/Controllers/NotificationsController.php index f77d97c9..8b7d35ef 100644 --- a/app/Http/Controllers/NotificationsController.php +++ b/app/Http/Controllers/NotificationsController.php @@ -65,7 +65,7 @@ class NotificationsController extends Controller return [ 'title' => $notification->data['title'], - 'content' => $converter->convertToHtml($notification->data['content'] ?? ''), + 'content' => $converter->convertToHtml($notification->data['content'] ?? '')->getContent(), 'time' => $notification->created_at->toDateTimeString(), ]; } diff --git a/tests/HttpTest/ControllersTest/NotificationsControllerTest.php b/tests/HttpTest/ControllersTest/NotificationsControllerTest.php index a575e0fc..9847eb92 100644 --- a/tests/HttpTest/ControllersTest/NotificationsControllerTest.php +++ b/tests/HttpTest/ControllersTest/NotificationsControllerTest.php @@ -119,7 +119,7 @@ class NotificationsControllerTest extends TestCase $this->postJson('/user/notifications/'.$notification->id) ->assertJson([ 'title' => $notification->data['title'], - 'content' => $converter->convertToHtml($notification->data['content']), + 'content' => $converter->convertToHtml($notification->data['content'])->getContent(), 'time' => $notification->created_at->toDateTimeString(), ]); $notification->refresh();