Skip to content

Commit b4568a0

Browse files
author
James Brundage
committed
Receive-OBS: Adding decoration when InputKind is found (Fixes #54)
1 parent 76bde8a commit b4568a0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Commands/Receive-OBS.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,16 @@ function Receive-OBS
125125
# Otherwise, create a new PSObject out of the response
126126
$responseObject = [PSObject]::new($responseObject)
127127

128+
# If the response is not a string
128129
if ($responseObject -isnot [string]) {
130+
# clear the typename.
129131
$responseObject.pstypenames.clear()
130132
}
131-
# and decorate it with the command name and OBS.requestype.response
133+
134+
if ($responseObject.inputKind) {
135+
$responseObject.pstypenames.add("OBS.Input.$($responseObject.inputKind)")
136+
}
137+
# Decorate the response with the command name and OBS.requestype.response
132138
$responseObject.pstypenames.add("$myCmd")
133139
$responseObject.pstypenames.add("OBS.$myRequestType.Response")
134140

0 commit comments

Comments
 (0)