From 141fa989326526f07b019044aa5fe4fcb38688d8 Mon Sep 17 00:00:00 2001 From: Naif Mohamed Date: Mon, 12 Mar 2018 14:26:38 +0500 Subject: [PATCH 1/3] fixed a typo on Talk.php --- src/Talk.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Talk.php b/src/Talk.php index ce03929..1bd3b61 100644 --- a/src/Talk.php +++ b/src/Talk.php @@ -323,7 +323,7 @@ public function threadsAll($order = 'desc', $offset = 0, $take = 20) } /** - * fetch all conversation by using coversation id. + * fetch all conversation by using conversation id. * * @param int $conversationId * @param int $offset = 0 @@ -339,7 +339,7 @@ public function getConversationsById($conversationId, $offset = 0, $take = 20) } /** - * fetch all conversation with soft deleted messages by using coversation id. + * fetch all conversation with soft deleted messages by using conversation id. * * @param int $conversationId * @param int $offset = 0 @@ -452,7 +452,7 @@ public function readMessage($messageId = null) if (!is_null($messageId)) { $message = $this->message->with(['sender', 'conversation'])->find($messageId); - if ($message->coversation->user_one == $this->authUserId || $message->coversation->user_two == $this->authUserId) { + if ($message->conversation->user_one == $this->authUserId || $message->conversation->user_two == $this->authUserId) { return $message; } } From dd992ae66ae915ac75622b035129f3097109857e Mon Sep 17 00:00:00 2001 From: Naif Mohamed Date: Mon, 12 Mar 2018 14:36:10 +0500 Subject: [PATCH 2/3] fixed creating a class from configured user model --- src/Talk.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Talk.php b/src/Talk.php index 1bd3b61..49e9ccd 100644 --- a/src/Talk.php +++ b/src/Talk.php @@ -496,7 +496,7 @@ public function getReceiverInfo($conversationId) $receiver = $conversation->user_one; } - $userModel = $this->config('talk.user.model'); + $userModel = config('talk.user.model', 'App\User'); $user = new $userModel(); return $user->find($receiver); From 3fb58d94e84aa37d8e8b8fa1c7e386c5d1fb8793 Mon Sep 17 00:00:00 2001 From: Naif Mohamed Date: Mon, 19 Nov 2018 17:07:56 +0500 Subject: [PATCH 3/3] changes that @nahid requested --- src/Talk.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Talk.php b/src/Talk.php index 49e9ccd..c2920fa 100644 --- a/src/Talk.php +++ b/src/Talk.php @@ -496,7 +496,7 @@ public function getReceiverInfo($conversationId) $receiver = $conversation->user_one; } - $userModel = config('talk.user.model', 'App\User'); + $userModel = $this->config('talk.user.model', 'App\User'); $user = new $userModel(); return $user->find($receiver);