only create event on first calendar integration (#1155)
* only create event on first calendar integration * fix it Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									bf659c0b16
								
							
						
					
					
						commit
						d4f8030b6b
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		|  | @ -213,10 +213,15 @@ export default class EventManager { | |||
|    * @private | ||||
|    */ | ||||
| 
 | ||||
|   private createAllCalendarEvents(event: CalendarEvent, noMail: boolean | null): Promise<Array<EventResult>> { | ||||
|     return async.mapLimit(this.calendarCredentials, 5, async (credential: Credential) => { | ||||
|       return createEvent(credential, event, noMail); | ||||
|     }); | ||||
|   private async createAllCalendarEvents( | ||||
|     event: CalendarEvent, | ||||
|     noMail: boolean | null | ||||
|   ): Promise<Array<EventResult>> { | ||||
|     const [firstCalendar] = this.calendarCredentials; | ||||
|     if (!firstCalendar) { | ||||
|       return []; | ||||
|     } | ||||
|     return [await createEvent(firstCalendar, event, noMail)]; | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Alex Johansson
						Alex Johansson