def trigger_session_schedule_change_notifications(session, event_id):
    link = url_for('event_sessions.session_display_view', event_id=event_id, session_id=session.id, _external=True)
    for speaker in session.speakers:
        email_notification_setting = DataGetter.get_email_notification_settings_by_event_id(speaker.user_id, event_id)
        if email_notification_setting and email_notification_setting.session_schedule == 1:
            send_schedule_change(speaker.email, session.title, link)
            # Send notification
            send_notif_session_schedule(speaker.user, session.title, link)
def trigger_session_schedule_change_notifications(session, event_id):
    link = url_for('event_sessions.session_display_view', event_id=event_id, session_id=session.id, _external=True)
    admin_msg_setting = DataGetter.get_message_setting_by_action(SESSION_SCHEDULE)
    for speaker in session.speakers:
        email_notification_setting = DataGetter.get_email_notification_settings_by_event_id(speaker.user_id, event_id)
        if not admin_msg_setting or \
                (email_notification_setting and email_notification_setting.session_schedule == 1 and
                    admin_msg_setting.user_control_status == 1) or \
                admin_msg_setting.user_control_status == 0:
            send_schedule_change(speaker.email, session.title, link)
            # Send notification
        send_notif_session_schedule(speaker.user, session.title, link)
def trigger_session_schedule_change_notifications(session, event_id):
    link = url_for('event_sessions.session_display_view', event_id=event_id, session_id=session.id, _external=True)
    admin_msg_setting = DataGetter.get_message_setting_by_action(SESSION_SCHEDULE)
    for speaker in session.speakers:
        email_notification_setting = DataGetter.get_email_notification_settings_by_event_id(speaker.user_id, event_id)
        if not admin_msg_setting or \
                (email_notification_setting and email_notification_setting.session_schedule == 1 and
                    admin_msg_setting.user_control_status == 1) or \
                admin_msg_setting.user_control_status == 0:
            send_schedule_change(speaker.email, session.title, link)
            # Send notification
        send_notif_session_schedule(speaker.user, session.title, link)