Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/identity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ def needs_aadhaar_upload?
end

def under_13? = age < 13
def eighteen_or_under? = age <= 18

def locked? = locked_at.present?

Expand Down
26 changes: 26 additions & 0 deletions app/models/onboarding_scenarios/hackatime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module OnboardingScenarios
class Hackatime < Base
def self.slug = "hackatime"

def title
"Sign in to Hackatime"
end

def form_fields
[ :first_name, :last_name, :primary_email, :birthday, :country ]
end

def accepts_adults = true

def should_create_slack? = @identity.birthday.present? && @identity.eighteen_or_under?

def next_action = :home

def slack_user_type = :multi_channel_guest
def slack_onboarding_flow = :internal_tutorial
def slack_channels = Rails.configuration.slack_channels.slice(:welcome_to_hack_club, :hackatime_dev, :hackatime_help).values
def promotion_channels = Rails.configuration.slack_channels.slice(:announcements, :happenings, :community, :hardware, :code, :ship, :neighbourhood, :library, :lounge).values
Comment on lines +21 to +22
def send_ephemeral_in_channel? = true
def ephemeral_channel = Rails.configuration.slack_channels[:welcome_to_hack_club]
end
end
2 changes: 2 additions & 0 deletions config/slack_channels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ production:
help: C07TM4C0AQ5
pyramid-scheme: C07N1TCHY3T
waiting_room: C0A24UHUMA7
hackatime_dev: C08MDGUPJ6A
hackatime_help: C0AFG0XGGMP
Comment on lines +17 to +18
#Below: new welcome channel added Jan 2026. This will
#need to be replaced with a channel name once we implement
#automatic retiring and renaming of the welcome channel //EPS
Expand Down
Loading