def get_poll_text_and_vote_keyboard(
    session, poll, user=None, show_warning=False, show_back=False,
):
    """Get the text and the vote keyboard."""
    text, summarize = get_poll_text_and_summarize(session, poll, show_warning=False,)

    keyboard = get_vote_keyboard(poll, user, show_back, summary=summarize)

    return text, keyboard
Esempio n. 2
0
def get_poll_text_and_vote_keyboard(session,
                                    poll,
                                    show_warning=False,
                                    show_back=False):
    """Get the text and the vote keyboard."""
    text, summarize = get_poll_text_and_summarize(session,
                                                  poll,
                                                  show_warning=False)

    if summarize:
        keyboard = get_vote_keyboard_with_summary(poll, show_back)
    else:
        keyboard = get_vote_keyboard(poll, show_back)

    return text, keyboard