diff --git a/PSMatrix.psd1 b/PSMatrix.psd1 index 69f46a7..967e652 100644 --- a/PSMatrix.psd1 +++ b/PSMatrix.psd1 @@ -9,7 +9,7 @@ @{ # Script module or binary module file associated with this manifest. -# RootModule = '' +RootModule = 'PSMatrix.psm1' # Version number of this module. ModuleVersion = '0.0.1' @@ -60,7 +60,9 @@ PowerShellVersion = '7.0' # ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @( + 'PSMatrixTypes.ps1xml' +) # Format files (.ps1xml) to be loaded when importing this module # FormatsToProcess = @() diff --git a/PSMatrixTypes.ps1xml b/PSMatrixTypes.ps1xml new file mode 100644 index 0000000..611fe6d --- /dev/null +++ b/PSMatrixTypes.ps1xml @@ -0,0 +1,31 @@ + + + MatrixMessage + + + EventID + EventID + + + Sender + Sender + + + Body + Body + + + Format + Format + + + FormattedBody + FormattedBody + + + MsgType + MsgType + + + + \ No newline at end of file diff --git a/public/Get-MatrixRoomMessages.ps1 b/public/Get-MatrixRoomMessages.ps1 index 53d76ef..7244d68 100644 --- a/public/Get-MatrixRoomMessages.ps1 +++ b/public/Get-MatrixRoomMessages.ps1 @@ -70,6 +70,7 @@ function Get-MatrixRoomMessages { FormattedBody = $_.content.formatted_body MsgType = $_.content.msgtype } + $formattedEvent.PSObject.TypeNames.Insert(0, 'MatrixMessage') $formattedEvents += $formattedEvent }