public function sendMessageByUserId($receiverId, $message)
    {
        if ($conversationId = $this->isConversationExists($receiverId)) {
            $message = $this->makeMessage($conversationId, $message);

            return $message;
        }

        $convId = $this->newConversation($receiverId);
        $message = $this->makeMessage($convId, $message);

        return $message;
    }
public function sendMessageByUserId($receiverId, $message)
    {
        if ($conversationId = $this->isConversationExists($receiverId)) {
            $message = $this->makeMessage($conversationId, $message);

            return $message;
        }

        $convId = $this->newConversation($receiverId);
        $message = $this->makeMessage($convId, $message);

        return $message;
    }
public function sendMessageByUserId ( $ receiverId , $ message ) { if ( $ conversationId = $ this -> isConversationExists ( $ receiverId ) ) { $ message = $ this -> makeMessage ( $ conversationId , $ message ) ; return $ message ; } $ convId = $ this -> newConversation ( $ receiverId ) ; $ message = $ this -> makeMessage ( $ convId , $ message ) ; return $ message ; }
create a new message by using receiverid.

@param int    $receiverId
@param string $message

@return \Nahid\Talk\Messages\Message
create a new message by using receiverid .