-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not sync events if the user declined an event invitation #45
Comments
Thanks! This would be an awesome feature :-) |
@MichaelEischer i just fiddled around a bit and i wanted to document my findings.. On Outlook, this seems to be relatively easy, as the Outlook Event provides a responsestatus resource as part of the event resource. On Google it is a bit trickier, there are two fields which i thought would play a role here:
Status only reflects the event organizers state. Which means if the organizer has not cancelled the event, the status will always be confirmed and the field does not have anything to do with the response of the user.. But the attendees field would be the one we search for. We would need to check if one of the attendees has the field Some test code in the google adapter (in ListEvents): for _, event := range eventList.Items {
var declinedBuffer bool = false
for _, v := range event.Attendees {
if v.Self == true && v.ResponseStatus == "declined" {
fmt.Println("we declined the event, remove it")
declinedBuffer = true
}
}
if declinedBuffer {
declinedBuffer = false
continue
}
loadedEvents = append(loadedEvents, calendarEventToEvent(event, g.GetSourceID()))
} Instead of filtering in the adapters, we could simply add a new field to But as i'm out of time today, i'll have a look at this on another day. |
If we only ever use a |
Worked on this in: #62 works for google and outlook, did not look into zep (we should consider deprecating this adapter as nobody uses it anyways 😂 ) |
#62 has been merged by now. |
If a user declines an event invitation in his source calendar, the event still gets synced to the sink calendar. We should make it optional to sync these events.
The text was updated successfully, but these errors were encountered: