Added EventRecurs as option for backup details.
This commit is contained in:
parent
245bb6e73e
commit
068f0560e4
@ -11,9 +11,11 @@ import (
|
||||
|
||||
// EventInfo searchable metadata for stored event objects.
|
||||
func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
||||
organizer := ""
|
||||
subject := ""
|
||||
start := time.Time{}
|
||||
var (
|
||||
organizer, subject string
|
||||
recurs bool
|
||||
start = time.Time{}
|
||||
)
|
||||
|
||||
if evt.GetOrganizer() != nil &&
|
||||
evt.GetOrganizer().GetEmailAddress() != nil &&
|
||||
@ -27,6 +29,10 @@ func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
||||
subject = *evt.GetSubject()
|
||||
}
|
||||
|
||||
if evt.GetRecurrence() != nil {
|
||||
recurs = true
|
||||
}
|
||||
|
||||
if evt.GetStart() != nil &&
|
||||
evt.GetStart().GetDateTime() != nil {
|
||||
// timeString has 'Z' literal added to ensure the stored
|
||||
@ -40,8 +46,9 @@ func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
||||
}
|
||||
|
||||
return &details.ExchangeInfo{
|
||||
Organizer: organizer,
|
||||
Subject: subject,
|
||||
EventStart: start,
|
||||
Organizer: organizer,
|
||||
Subject: subject,
|
||||
EventStart: start,
|
||||
EventRecurs: recurs,
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,6 +142,7 @@ type ExchangeInfo struct {
|
||||
EventStart time.Time `json:"eventStart,omitempty"`
|
||||
Organizer string `json:"organizer,omitempty"`
|
||||
ContactName string `json:"contactName,omitempty"`
|
||||
EventRecurs bool `json:"eventRecurs,omitempty"`
|
||||
}
|
||||
|
||||
// Headers returns the human-readable names of properties in an ExchangeInfo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user