diff --git a/ruby/lib/jam_ruby/models/music_session.rb b/ruby/lib/jam_ruby/models/music_session.rb index ff4b2e3ea..375e3806c 100644 --- a/ruby/lib/jam_ruby/models/music_session.rb +++ b/ruby/lib/jam_ruby/models/music_session.rb @@ -380,16 +380,14 @@ module JamRuby ms.invitations << invitation - # if the session start time is not within the next 1 minute (user could create a "scheduled session" - # for 8:30 at 8:29. In this case send the regular scheduled session notification since it's still "future") - # send SCHEDULED SESSION INVITATION - if ms.scheduled_start && (ms.scheduled_start - Time.now.utc) / 60 > 1 + # send scheduled session notification or join session notification + case ms.create_type + when CREATE_TYPE_RSVP, CREATE_TYPE_SCHEDULE_FUTURE Notification.send_scheduled_session_invitation(ms, receiver) - - # otherwise send the notification that allows the user to join the session directly else Notification.send_session_invitation(receiver, user, ms.id) end + end if options[:invitations] options[:music_notations].each do |notation|