mirror of
https://github.com/Thumbscrew/PSMatrix.git
synced 2025-04-12 02:03:39 +00:00
Add custom MatrixMessage type
This commit is contained in:
parent
0fe7967b23
commit
c1f4ea82fb
@ -9,7 +9,7 @@
|
|||||||
@{
|
@{
|
||||||
|
|
||||||
# Script module or binary module file associated with this manifest.
|
# Script module or binary module file associated with this manifest.
|
||||||
# RootModule = ''
|
RootModule = 'PSMatrix.psm1'
|
||||||
|
|
||||||
# Version number of this module.
|
# Version number of this module.
|
||||||
ModuleVersion = '0.0.1'
|
ModuleVersion = '0.0.1'
|
||||||
@ -60,7 +60,9 @@ PowerShellVersion = '7.0'
|
|||||||
# ScriptsToProcess = @()
|
# ScriptsToProcess = @()
|
||||||
|
|
||||||
# Type files (.ps1xml) to be loaded when importing this module
|
# Type files (.ps1xml) to be loaded when importing this module
|
||||||
# TypesToProcess = @()
|
TypesToProcess = @(
|
||||||
|
'PSMatrixTypes.ps1xml'
|
||||||
|
)
|
||||||
|
|
||||||
# Format files (.ps1xml) to be loaded when importing this module
|
# Format files (.ps1xml) to be loaded when importing this module
|
||||||
# FormatsToProcess = @()
|
# FormatsToProcess = @()
|
||||||
|
31
PSMatrixTypes.ps1xml
Normal file
31
PSMatrixTypes.ps1xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<Types>
|
||||||
|
<Type>
|
||||||
|
<Name>MatrixMessage</Name>
|
||||||
|
<Members>
|
||||||
|
<NoteProperty>
|
||||||
|
<Name>EventID</Name>
|
||||||
|
<Value>EventID</Value>
|
||||||
|
</NoteProperty>
|
||||||
|
<NoteProperty>
|
||||||
|
<Name>Sender</Name>
|
||||||
|
<Value>Sender</Value>
|
||||||
|
</NoteProperty>
|
||||||
|
<NoteProperty>
|
||||||
|
<Name>Body</Name>
|
||||||
|
<Value>Body</Value>
|
||||||
|
</NoteProperty>
|
||||||
|
<NoteProperty>
|
||||||
|
<Name>Format</Name>
|
||||||
|
<Value>Format</Value>
|
||||||
|
</NoteProperty>
|
||||||
|
<NoteProperty>
|
||||||
|
<Name>FormattedBody</Name>
|
||||||
|
<Value>FormattedBody</Value>
|
||||||
|
</NoteProperty>
|
||||||
|
<NoteProperty>
|
||||||
|
<Name>MsgType</Name>
|
||||||
|
<Value>MsgType</Value>
|
||||||
|
</NoteProperty>
|
||||||
|
</Members>
|
||||||
|
</Type>
|
||||||
|
</Types>
|
@ -70,6 +70,7 @@ function Get-MatrixRoomMessages {
|
|||||||
FormattedBody = $_.content.formatted_body
|
FormattedBody = $_.content.formatted_body
|
||||||
MsgType = $_.content.msgtype
|
MsgType = $_.content.msgtype
|
||||||
}
|
}
|
||||||
|
$formattedEvent.PSObject.TypeNames.Insert(0, 'MatrixMessage')
|
||||||
|
|
||||||
$formattedEvents += $formattedEvent
|
$formattedEvents += $formattedEvent
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user