diff --git a/src/Talk.php b/src/Talk.php index ce03929..c2920fa 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; } } @@ -496,7 +496,7 @@ public function getReceiverInfo($conversationId) $receiver = $conversation->user_one; } - $userModel = $this->config('talk.user.model'); + $userModel = $this->config('talk.user.model', 'App\User'); $user = new $userModel(); return $user->find($receiver);