Make contact messages send with priority
This commit is contained in:
parent
14dc9c2447
commit
2fede56806
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SwUserDefinedSpecifications">
|
||||
<option name="specTypeByUrl">
|
||||
<map />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user