protected function newConversation($receiverId)
{
$conversationId = $this->isConversationExists($receiverId);
$user = $this->getSerializeUser($this->authUserId, $receiverId);
if ($conversationId === false) {
$conversation = $this->conversation->create(['user_one' => $user['one'], 'user_two' => $user['two'], 'status' => 1]);
if ($conversation) {
return $conversation->id;
}
}
return $conversationId;
}