diff --git a/app/Models/User.php b/app/Models/User.php index 498e7c22a4..ce4893bf77 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -918,7 +918,7 @@ public function sendSystemNotification(string $subject, string $message): void PrivateMessage::create([ 'conversation_id' => $conversation->id, - 'sender_id' => $this->id, + 'sender_id' => self::SYSTEM_USER_ID, 'message' => $message ]); } @@ -931,7 +931,7 @@ public static function sendSystemNotificationTo(int $userId, string $subject, st PrivateMessage::create([ 'conversation_id' => $conversation->id, - 'sender_id' => $userId, + 'sender_id' => self::SYSTEM_USER_ID, 'message' => $message ]); }