Skip to content

Commit

Permalink
Only mark user as busy if there's an opaque event.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Dec 8, 2012
1 parent 79f0546 commit 9f8d69d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sync_entry.rb
Expand Up @@ -26,7 +26,9 @@ class SyncEntry
before :create, :set_token

def busy?
calendar.find_events_in_range(Time.now, Time.now+1) != nil
events = calendar.find_events_in_range(Time.now, Time.now+1)

Array(events).any?(&:opaque?)
end

def do_not_disturb
Expand Down

0 comments on commit 9f8d69d

Please sign in to comment.