def notify_new_user(user_profile: UserProfile) -> None:
    sender_email = settings.NOTIFICATION_BOT
    sender = get_system_bot(sender_email)
    user_count = realm_user_count(user_profile.realm)
    signup_notifications_stream = user_profile.realm.get_signup_notifications_stream()
    if ((signup_notifications_stream is not None) and (user_count > 1)):
        with override_language(user_profile.realm.default_language):
            message = _('{user} just signed up for Zulip. (total: {user_count})').format(user=f'@_**{user_profile.full_name}|{user_profile.id}**', user_count=user_count)
            internal_send_stream_message(user_profile.realm, sender, signup_notifications_stream, _('signups'), message)
    admin_realm = sender.realm
    try:
        signups_stream = get_signups_stream(admin_realm)
        with override_language(admin_realm.default_language):
            message = _('{user} just signed up for Zulip. (total: {user_count})').format(user=f'{user_profile.full_name} <`{user_profile.email}`>', user_count=user_count)
            internal_send_stream_message(admin_realm, sender, signups_stream, user_profile.realm.display_subdomain, message)
    except Stream.DoesNotExist:
        pass
def notify_new_user(user_profile: UserProfile) -> None:
    sender_email = settings.NOTIFICATION_BOT
    sender = get_system_bot(sender_email)
    user_count = realm_user_count(user_profile.realm)
    signup_notifications_stream = user_profile.realm.get_signup_notifications_stream()
    if ((signup_notifications_stream is not None) and (user_count > 1)):
        with override_language(user_profile.realm.default_language):
            message = _('{user} just signed up for Zulip. (total: {user_count})').format(user=f'@_**{user_profile.full_name}|{user_profile.id}**', user_count=user_count)
            internal_send_stream_message(user_profile.realm, sender, signup_notifications_stream, _('signups'), message)
    admin_realm = sender.realm
    try:
        signups_stream = get_signups_stream(admin_realm)
        with override_language(admin_realm.default_language):
            message = _('{user} just signed up for Zulip. (total: {user_count})').format(user=f'{user_profile.full_name} <`{user_profile.email}`>', user_count=user_count)
            internal_send_stream_message(admin_realm, sender, signups_stream, user_profile.realm.display_subdomain, message)
    except Stream.DoesNotExist:
        pass