Make contact messages send with priority

This commit is contained in:
Garrett Mills 2022-05-11 22:54:02 -05:00
parent 14dc9c2447
commit 2fede56806
2 changed files with 6 additions and 10 deletions

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SwUserDefinedSpecifications">
<option name="specTypeByUrl">
<map />
</option>
</component>
</project>

View File

@ -10,7 +10,7 @@ import {
file,
Application,
make,
Valid,
Valid, Logging,
} from '@extollo/lib'
import {WorkItem} from '../../models/WorkItem.model'
import {FeedPost} from '../../models/FeedPost.model'
@ -32,6 +32,9 @@ export class Home extends Controller {
@Inject()
protected readonly gotify!: Gotify
@Inject()
protected readonly logging!: Logging
public async welcome(feedPosts: Collection<FeedPost>) {
const workItems = await this.getWorkItems()
@ -118,13 +121,14 @@ export class Home extends Controller {
this.gotify.send({
app: this.config.get('gotify.app'),
title: `Contact form submission from ${data.name}`,
priority: 5,
message: [
`From: ${data.name}`,
`E-mail: ${data.email}`,
'Message:',
data.message,
].join('\n'),
})
}).then(x => this.logging.debug(x))
return view('message', {
title: 'Message Sent',