def on_wavelet_blip_removed(event, wavelet):
    if preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    if wavelet.root_blip and event.blip_id == wavelet.root_blip.blip_id:
        general.wavelet_init(wavelet, event.modified_by)

    notifications.notify_removed(wavelet, event.modified_by)
def on_wavelet_blip_removed(event, wavelet):
    if preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    if wavelet.root_blip and event.blip_id == wavelet.root_blip.blip_id:
        general.wavelet_init(wavelet, event.modified_by)

    notifications.notify_removed(wavelet, event.modified_by)
def on_wavelet_participants_changed(event, wavelet):
    if preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    if wavelet.root_blip and event.blip_id == wavelet.root_blip.blip_id:
        general.wavelet_init(wavelet, event.modified_by)

    message = templates.ADDED_MESSAGE % event.modified_by
    for participant in event.participants_added:
        general.participant_wavelet_init(wavelet, participant,
                                         event.modified_by, message)
def on_wavelet_participants_changed(event, wavelet):
    if preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    if wavelet.root_blip and event.blip_id == wavelet.root_blip.blip_id:
        general.wavelet_init(wavelet, event.modified_by)

    message = templates.ADDED_MESSAGE % event.modified_by
    for participant in event.participants_added:
        general.participant_wavelet_init(wavelet, participant,
                                         event.modified_by, message)
def on_form_button_clicked(event, wavelet):
    if not preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    preferences.handle_event(event, wavelet)
def on_wavelet_self_removed(event, wavelet):
    if preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    general.wavelet_deinit(wavelet)
def on_form_button_clicked(event, wavelet):
    if not preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    preferences.handle_event(event, wavelet)
def on_wavelet_self_removed(event, wavelet):
    if preferences.is_preferences_wave(wavelet): return
    logging.info('%s called', event.type)
    setup_oauth(wavelet.robot, wavelet.domain)

    general.wavelet_deinit(wavelet)