busy_beaver/apps/slack_integration/event_subscription.py
def app_home_handler(data):
    """Display App Home

    Currently we do show first-time viewers a separate screen... should we?
    """
    logger.info("app_home_opened Event", extra=data)
    workspace_id = data["team_id"]
    user_id = data["event"]["user"]
    tab_opened = data["event"]["tab"]

    if tab_opened != "home":
        return None

    installation = SlackInstallation.query.filter_by(workspace_id=workspace_id).first()
    params = {"installation_id": installation.id, "slack_id": user_id}
    user = SlackUser.query.filter_by(**params).first()
    if not user:
        logger.info("First app_home_opened for user", extra=data)
        user = SlackUser(**params)
        user.app_home_opened_count = 0

    user.app_home_opened_count += 1
    db.session.add(user)
    db.session.commit()

    github_summary_channel = None
    github_summary_configured = installation.github_summary_config
    if github_summary_configured:
        github_summary_channel = installation.github_summary_config.channel

    app_home = AppHome(
        github_summary_channel=github_summary_channel,
        upcoming_events_config=installation.upcoming_events_config,
    )

    slack = SlackClient(installation.bot_access_token)
    slack.display_app_home(user_id, view=app_home.to_dict())
    return None
Display App Home

    Currently we do show first-time viewers a separate screen... should we?
    
Display App Home
Currently we do show first-time viewers a separate screen...
Display App Home Currently we do show first - time viewers a separate screen ...
def app_home_handler(data):
    logger.info("app_home_opened Event", extra=data)
    workspace_id = data["team_id"]
    user_id = data["event"]["user"]
    tab_opened = data["event"]["tab"]
    if tab_opened != "home":
        return None
    installation = SlackInstallation.query.filter_by(workspace_id=workspace_id).first()
    params = {"installation_id": installation.id, "slack_id": user_id}
    user = SlackUser.query.filter_by(**params).first()
    if not user:
        logger.info("First app_home_opened for user", extra=data)
        user = SlackUser(**params)
        user.app_home_opened_count = 0
    user.app_home_opened_count += 1
    db.session.add(user)
    db.session.commit()
    github_summary_channel = None
    github_summary_configured = installation.github_summary_config
    if github_summary_configured:
        github_summary_channel = installation.github_summary_config.channel
    app_home = AppHome(
        github_summary_channel=github_summary_channel,
        upcoming_events_config=installation.upcoming_events_config,
    )
    slack = SlackClient(installation.bot_access_token)
    slack.display_app_home(user_id, view=app_home.to_dict())
    return None
def app_home_handler ( data ) : logger . info ( "app_home_opened Event" , extra = data ) workspace_id = data [ "team_id" ] user_id = data [ "event" ] [ "user" ] tab_opened = data [ "event" ] [ "tab" ] if tab_opened != "home" : return None installation = SlackInstallation . query . filter_by ( workspace_id = workspace_id ) . first ( ) params = { "installation_id" : installation . id , "slack_id" : user_id } user = SlackUser . query . filter_by ( ** params ) . first ( ) if not user : logger . info ( "First app_home_opened for user" , extra = data ) user = SlackUser ( ** params ) user . app_home_opened_count = 0 user . app_home_opened_count += 1 db . session . add ( user ) db . session . commit ( ) github_summary_channel = None github_summary_configured = installation . github_summary_config if github_summary_configured : github_summary_channel = installation . github_summary_config . channel app_home = AppHome ( github_summary_channel = github_summary_channel , upcoming_events_config = installation . upcoming_events_config , ) slack = SlackClient ( installation . bot_access_token ) slack . display_app_home ( user_id , view = app_home . to_dict ( ) ) return None
Display App Home
Currently we do show first-time viewers a separate screen... should we?
Display App Home Currently we do show first - time viewers a separate screen ... should we?
"""Display App Home

    Currently we do show first-time viewers a separate screen... should we?
    """
data