From 8c08356fe135c73fbdeb635c10280111b794b51d Mon Sep 17 00:00:00 2001 From: Roardom Date: Tue, 2 Jul 2024 21:08:54 +0000 Subject: [PATCH] fix: send system messages from system instead of user --- app/Models/User.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ]); }