

@classmethod
@gen.coroutine
def SendRegisterAlert(cls, client, register_user_id, target_user_id, target_settings):
    'Sends alert to the specified target user, notifying him that one of his contacts has\n    registered for Viewfinder.\n    '
    if ((target_settings.push_alerts is not None) and (target_settings.push_alerts != AccountSettings.PUSH_NONE)):
        if (register_user_id != target_user_id):
            target_name = (yield AlertManager._GetNameFromUserId(client, register_user_id, prefer_given_name=False))
            alert_text = ('%s has joined Viewfinder' % target_name)
            (yield AlertManager._SendDeviceAlert(client, target_user_id, viewpoint_id=None, badge=None, alert_text=alert_text, sound=PushNotification.DEFAULT_SOUND))

dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/alert_manager.py AlertManager.SendRegisterAlert/original