From 5891aef80487f1bbed326a7e0b51ab0ad1748843 Mon Sep 17 00:00:00 2001 From: IanM <16573496+imorland@users.noreply.github.com> Date: Fri, 15 Dec 2023 21:00:39 +0000 Subject: [PATCH] fix: session can be null --- src/PostAttributes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PostAttributes.php b/src/PostAttributes.php index 3396e3d..320a788 100644 --- a/src/PostAttributes.php +++ b/src/PostAttributes.php @@ -85,7 +85,7 @@ protected function getActorReactionForPost(User $actor, Post $post, ServerReques } return PostAnonymousReaction::where('post_id', $post->id) - ->where('guest_id', $request->getAttribute('session')->getId()) + ->where('guest_id', $session->getId()) ->value('reaction_id'); }