Skip to content

Commit

Permalink
Merge pull request #33 from PetriAsi/develop
Browse files Browse the repository at this point in the history
Allow body to be submitted as html
  • Loading branch information
PetriAsi authored Sep 7, 2023
2 parents 67ca9d3 + b4410fe commit 1dbc9c6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions WilmaPSWorker/Public/Send-WPSWMessage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ function Send-WPSWMessage (){
[string]
$MessageBody,

# Body is formad as as HTML
[Parameter(Mandatory=$true,ParameterSetName='NewMessage')]
[Parameter(Mandatory=$true,ParameterSetName='ReplyMessage')]
[switch]
$AsHTML,

# Message subject
[Parameter(Mandatory=$true,ParameterSetName='NewMessage')]
[string]
Expand Down Expand Up @@ -114,6 +120,13 @@ function Send-WPSWMessage (){
bodyText = $MessageBody
}


if ($true -eq $AsHTML) {
$Body += @{
wysiwyg = "ckeditor"
}
}

if ( -not $Reply_id) {
$Body += @{
Subject = $Subject
Expand Down

0 comments on commit 1dbc9c6

Please sign in to comment.