summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-08-16 07:17:57 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-08-16 08:17:57 -0400
commitb122381e87577ddfc12b792a3de9121ea830d50e (patch)
tree1487a6a97aa0a928db230b207463e721e56858c9 /cmd
parent5cd45c939406e5af84b0d9a6967683b77100303c (diff)
downloadchat-b122381e87577ddfc12b792a3de9121ea830d50e.tar.gz
chat-b122381e87577ddfc12b792a3de9121ea830d50e.tar.bz2
chat-b122381e87577ddfc12b792a3de9121ea830d50e.zip
PLT-1649: add response_url support for custom slash commands (#6739)
* add response_url support for custom slash commands * pr suggestions * pr update / suggestion * test fix
Diffstat (limited to 'cmd')
-rw-r--r--cmd/platform/server.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/platform/server.go b/cmd/platform/server.go
index 8695129b7..79193cd0f 100644
--- a/cmd/platform/server.go
+++ b/cmd/platform/server.go
@@ -107,6 +107,7 @@ func runServer(configFileLocation string) {
go runDiagnosticsJob()
go runTokenCleanupJob()
+ go runCommandWebhookCleanupJob()
if complianceI := einterfaces.GetComplianceInterface(); complianceI != nil {
complianceI.StartComplianceDailyJob()
@@ -170,6 +171,11 @@ func runTokenCleanupJob() {
model.CreateRecurringTask("Token Cleanup", doTokenCleanup, time.Hour*1)
}
+func runCommandWebhookCleanupJob() {
+ doCommandWebhookCleanup()
+ model.CreateRecurringTask("Command Hook Cleanup", doCommandWebhookCleanup, time.Hour*1)
+}
+
func resetStatuses() {
if result := <-app.Srv.Store.Status().ResetAll(); result.Err != nil {
l4g.Error(utils.T("mattermost.reset_status.error"), result.Err.Error())
@@ -204,3 +210,7 @@ func doDiagnostics() {
func doTokenCleanup() {
app.Srv.Store.Token().Cleanup()
}
+
+func doCommandWebhookCleanup() {
+ app.Srv.Store.CommandWebhook().Cleanup()
+}