no alert on focusTime, outOfOffice
parent
aeb575e621
commit
7d2b9764c3
4
gcal.go
4
gcal.go
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"slices"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
@ -55,6 +56,9 @@ func (gcal *GCal) EventsToday(ctx context.Context) ([]Event, error) {
|
||||||
if events.Items[i].Start.DateTime == "" {
|
if events.Items[i].Start.DateTime == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if slices.Contains([]string{"focusTime", "outOfOffice"}, events.Items[i].EventType) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
t, err := time.Parse(time.RFC3339, events.Items[i].Start.DateTime)
|
t, err := time.Parse(time.RFC3339, events.Items[i].Start.DateTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue