Skip to content

Commit

Permalink
Merge pull request hackclub#335 from hackclub/remove-first-check-in-o…
Browse files Browse the repository at this point in the history
…f-semester

Remove check-in flow for first check-in of the semester
  • Loading branch information
maxwofford authored Jan 27, 2018
2 parents 282d351 + 01c2403 commit 0c99d26
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
13 changes: 0 additions & 13 deletions api/app/models/hackbot/interactions/check_in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ def start
flavor_text = copy('greeting.flavor_text')
deadline = formatted_deadline leader
key = 'greeting.' + (first_check_in? ? 'if_first_check_in' : 'default')
if first_check_in_of_semester
key = 'greeting.if_first_check_in_of_semester'
end
key = 'greeting.restart' if @restart
actions = []

Expand Down Expand Up @@ -548,16 +545,6 @@ def first_check_in?
.where("data->>'channel' = ?", data['channel']).empty?
end

def first_check_in_of_semester
!first_check_in? &&
Hackbot::Interactions::CheckIn
.where("data->>'channel' = ?", data['channel'])
.where(
'created_at > ?',
Time.zone.now.change(month: 6, day: 1, minute: 0, hour: 0)
).empty?
end

def integer?(str)
Integer(str) && true
rescue ArgumentError
Expand Down
6 changes: 0 additions & 6 deletions api/lib/data/copy/check_in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ greeting:
I'll be reaching out to you every week, typically on Fridays, to check in and see how your club's doing. I'll be in the loop every step of the way 🙂
To start, did you have a club meeting this week?
if_first_check_in_of_semester: |
Hey <%= first_name %>! Orpheus here, hope you've had a great break!
You've been scheduled to restart your club this week, if this is no longer true (or there's some other issue) you should message <@U0C7B14Q3> to get it resolved.
OK, time for the check-in: Did you have a meeting this week?
default: |
Hey <%= first_name %>, <%= flavor_text %>
Expand Down

0 comments on commit 0c99d26

Please sign in to comment.