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) {
                return $message;
            }
        }

        return false;
    }
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) {
                return $message;
            }
        }

        return false;
    }
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 ) { return $ message ; } } return false ; }
read a single message by message id.

@param int $messageId

@return \Nahid\Talk\Messages\Message|bool
read a single message by message id .