diff --git a/src/Repositories/Conversation/ConversationRepository.php b/src/Repositories/Conversation/ConversationRepository.php index a85da3a..8cd9142 100755 --- a/src/Repositories/Conversation/ConversationRepository.php +++ b/src/Repositories/Conversation/ConversationRepository.php @@ -122,7 +122,12 @@ public function getConversationMessageById($conversationId, $userID, $channel) return collect($collection); } + public function getConversationMessagesOnly($conversationId) + { + $conversation = $this->query()->with(['messages', 'messages.sender', 'messages.files', 'firstUser', 'secondUser', 'files'])->find($conversationId); + return collect($conversation->messages); + } /** * @param $conversationId * @param array $data @@ -188,6 +193,7 @@ public function acceptMessageRequest($userId, $conversationId) * * @return bool */ + public function checkUserExist($userId, $conversationId) { $thread = $this->find($conversationId);