Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a typo on Talk.php #116

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Talk.php
Original file line number Diff line number Diff line change
@@ -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 = config('talk.user.model', 'App\User');
$user = new $userModel();

return $user->find($receiver);