@@ -137,7 +137,7 @@ function SetDelegateRole {
137137 # Determine whether the user takes action on the shared rows themselves.
138138 [array ] $userChangesOnShared = $sharedRows | Where-Object {
139139 $_.TriggerAction -in @ (' Create' , ' Update' , ' SoftDelete' , ' MoveToDeletedItems' , ' HardDelete' ) -and
140- (Test-ResponsibleUserMatchesIdentity - ResponsibleUser $_.ResponsibleUser - Sender $_.Sender - Identity $Identity )
140+ (Test-ResponsibleUserMatchesIdentity - ResponsibleUser $_.ResponsibleUser - SenderSmtp $_.Sender - Identity $Identity )
141141 }
142142
143143 # Resp.* rows that arrived inside the shared folder are the "received all Resp's" signal.
@@ -188,13 +188,13 @@ Compares a ResponsibleUser / Sender SMTP value (from EnhancedCalLogs) to the Ide
188188function Test-ResponsibleUserMatchesIdentity {
189189 param (
190190 [string ] $ResponsibleUser ,
191- [string ] $Sender ,
191+ [string ] $SenderSmtp ,
192192 [string ] $Identity
193193 )
194194
195195 if ([string ]::IsNullOrEmpty($Identity )) { return $false }
196196
197- foreach ($value in @ ($ResponsibleUser , $Sender )) {
197+ foreach ($value in @ ($ResponsibleUser , $SenderSmtp )) {
198198 if ([string ]::IsNullOrEmpty($value ) -or $value -eq ' -' -or $value -eq ' NotFound' ) { continue }
199199 if ([string ]::Equals($value.Trim (), $Identity.Trim (), [System.StringComparison ]::OrdinalIgnoreCase)) {
200200 return $true
@@ -217,7 +217,7 @@ function Get-MeetingOrganizerSmtp {
217217 return $null
218218 }
219219
220- [array ] $appointmentFroms = $EnhancedCalLogs |
220+ [array ] $appointmentFrom = $EnhancedCalLogs |
221221 Where-Object {
222222 ($_.ItemClass -eq ' Ipm.Appointment' -or $_.ItemClass -like ' Exception*' ) -and
223223 -not [string ]::IsNullOrEmpty($_.From ) -and
@@ -226,11 +226,11 @@ function Get-MeetingOrganizerSmtp {
226226 } |
227227 ForEach-Object { ([string ]$_.From ).Trim() }
228228
229- if ($appointmentFroms .Count -eq 0 ) {
229+ if ($appointmentFrom .Count -eq 0 ) {
230230 return $null
231231 }
232232
233- return ($appointmentFroms | Group-Object | Sort-Object Count - Descending | Select-Object - First 1 ).Name
233+ return ($appointmentFrom | Group-Object | Sort-Object Count - Descending | Select-Object - First 1 ).Name
234234}
235235
236236<#
0 commit comments