Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Badgerati committed Oct 18, 2021
1 parent 46c8bcf commit e2138d8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Public/Responses.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,9 @@ The Depth to generate the JSON document - the larger this value the worse perfor
.PARAMETER Mode
The Mode to broadcast a message: Auto, Broadcast, Direct. (Default: Auto)
.PARAMETER IgnoreEvent
If supplied, if a SignalEvent is available it's data, such as path/clientId, will be ignored.
.EXAMPLE
Send-PodeSignal -Value @{ Message = 'Hello, world!' }
Expand Down Expand Up @@ -1427,7 +1430,10 @@ function Send-PodeSignal
[Parameter()]
[ValidateSet('Auto', 'Broadcast', 'Direct')]
[string]
$Mode = 'Auto'
$Mode = 'Auto',

[switch]
$IgnoreEvent
)

# error if not configured
Expand All @@ -1446,13 +1452,13 @@ function Send-PodeSignal
}

# check signal event
if ($null -ne $SignalEvent) {
if (!$IgnoreEvent -and ($null -ne $SignalEvent)) {
if ([string]::IsNullOrWhiteSpace($Path)) {
$Path = $SignalEvent.Data.Path
}

if ([string]::IsNullOrWhiteSpace($ClientId)) {
$Path = $SignalEvent.Data.ClientId
$ClientId = $SignalEvent.Data.ClientId
}

if (($Mode -ieq 'Auto') -and ($SignalEvent.Data.Direct -or ($SignalEvent.ClientId -ieq $SignalEvent.Data.ClientId))) {
Expand Down

0 comments on commit e2138d8

Please sign in to comment.