diff --git a/src/calanonsync/ews.go b/src/calanonsync/ews.go index 7002687..b67c113 100644 --- a/src/calanonsync/ews.go +++ b/src/calanonsync/ews.go @@ -2,6 +2,8 @@ package main import ( "bytes" + "crypto/md5" + "encoding/hex" "encoding/xml" "fmt" "io" @@ -18,10 +20,20 @@ type FolderId struct { } type CalendarItem struct { - Subject string - UID string - Start time.Time - End time.Time + Subject string + UID string + Start time.Time + End time.Time + RecurrenceId string + Sensitivity string + CalendarItemType string +} + +func (ci CalendarItem) Hash() string { + h := md5.New() + h.Write([]byte(ci.UID)) + h.Write([]byte(ci.RecurrenceId)) + return strings.ToUpper(hex.EncodeToString(h.Sum(nil))) } type EWSCalendar struct {