def handle_mark_read_request(cls, request, message, dispatch, hash_is_valid, redirect_to):
        """Handles a request to mark a message as read.

        :param Request request: Request instance
        :param Message message: Message model instance
        :param Dispatch dispatch: Dispatch model instance
        :param bool hash_is_valid: Flag indicating that user supplied request signature is correct
        :param str redirect_to: Redirection URL
        :rtype: list
        """

        if hash_is_valid:
            dispatch.mark_read()
            dispatch.save()
            signal = sig_mark_read_success
        else:
            signal = sig_mark_read_failed

        signal.send(cls, request=request, message=message, dispatch=dispatch)
        return redirect(redirect_to)
def handle_mark_read_request ( cls , request , message , dispatch , hash_is_valid , redirect_to ) : if hash_is_valid : dispatch . mark_read ( ) dispatch . save ( ) signal = sig_mark_read_success else : signal = sig_mark_read_failed signal . send ( cls , request = request , message = message , dispatch = dispatch ) return redirect ( redirect_to )
Handles a request to mark a message as read.

        :param Request request: Request instance
        :param Message message: Message model instance
        :param Dispatch dispatch: Dispatch model instance
        :param bool hash_is_valid: Flag indicating that user supplied request signature is correct
        :param str redirect_to: Redirection URL
        :rtype: list