Ignore cancelled events
This commit is contained in:
		
							parent
							
								
									a20a9040b6
								
							
						
					
					
						commit
						3c400b3664
					
				| @ -25,7 +25,7 @@ func main() { | ||||
| 
 | ||||
| 	for _, item := range items { | ||||
| 		// Ignore private items. | ||||
| 		if item.Sensitivity != "Private" { | ||||
| 		if item.Sensitivity != "Private" && !item.IsCancelled { | ||||
| 			// None-private items though ... remember them by hash. | ||||
| 			// The hash will equal the CalDAV UID (and its filename). | ||||
| 			relevantEWSItems[item.Hash()] = item | ||||
|  | ||||
| @ -27,6 +27,8 @@ type CalendarItem struct { | ||||
| 	RecurrenceId     string | ||||
| 	Sensitivity      string | ||||
| 	CalendarItemType string | ||||
| 	IsCancelled      bool | ||||
| 	IsAllDayEvent    bool | ||||
| } | ||||
| 
 | ||||
| // Build a hash for the given calendar item by combining the UID and | ||||
| @ -206,7 +208,7 @@ var calendarQuery = template.Must(template.New("calendarQuery").Parse(`<?xml ver | ||||
|           <t:FieldURI FieldURI="calendar:RecurrenceId" /> | ||||
|           <t:FieldURI FieldURI="calendar:IsCancelled" /> | ||||
|           <t:FieldURI FieldURI="calendar:CalendarItemType" /> | ||||
|           <t:FieldURI FieldURI="calendar:CalendarItemType" /> | ||||
|           <t:FieldURI FieldURI="calendar:IsAllDayEvent" /> | ||||
|         </t:AdditionalProperties> | ||||
|       </m:ItemShape> | ||||
|       <m:CalendarView StartDate="{{ .StartDate }}" EndDate="{{ .EndDate }}" /> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user