From 3a11805122fc8684968a79e996e41fef65573694 Mon Sep 17 00:00:00 2001 From: Saifallak Date: Sun, 26 May 2024 19:16:41 +0300 Subject: [PATCH] Issue when participation is null #318 --- src/Models/Message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/Message.php b/src/Models/Message.php index 4498b7a..2cc792d 100644 --- a/src/Models/Message.php +++ b/src/Models/Message.php @@ -48,7 +48,7 @@ public function participation() public function getSenderAttribute() { - $participantModel = $this->participation->messageable; + $participantModel = $this->participation?->messageable; if (!isset($participantModel)) { return null;