Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
scrthq committed Nov 3, 2019
1 parent 9e70914 commit e0ef187
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions PSGSuite/Public/Calendar/New-GSCalendarEvent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -321,18 +321,17 @@ function New-GSCalendarEvent {
DateTime = $LocalEndDateTime
}
}
$verbMsg = $null
if ($CreateMeetEvent) {
$createRequest = New-Object 'Google.Apis.Calendar.v3.Data.CreateConferenceRequest'
$createRequest.RequestId = (New-Guid).ToString('n')
$confData = New-Object 'Google.Apis.Calendar.v3.Data.ConferenceData'
$confData.CreateRequest = $createRequest
$body.ConferenceData = $confData
$verbMsg = ' with Meet conferencing'
}
foreach ($calId in $CalendarID) {
if ($CreateMeetEvent) {
$createRequest = New-Object 'Google.Apis.Calendar.v3.Data.CreateConferenceRequest'
$createRequest.RequestId = (New-Guid).ToString('n')
$confData = New-Object 'Google.Apis.Calendar.v3.Data.ConferenceData'
$confData.CreateRequest = $createRequest
$body.ConferenceData = $confData
Write-Verbose "Creating Calendar Event '$($Summary)' with Meet conferencing on calendar '$calId' for user '$U'"
}
else {
Write-Verbose "Creating Calendar Event '$($Summary)' on calendar '$calId' for user '$U'"
}
Write-Verbose "Creating Calendar Event '$($Summary)'$($verbMsg) on calendar '$calId' for user '$U'"
$request = $service.Events.Insert($body,$calId)
if ($CreateMeetEvent) {
$request.ConferenceDataVersion = 1
Expand Down

0 comments on commit e0ef187

Please sign in to comment.