summaryrefslogtreecommitdiffstats
path: root/store/sql_webhook_store.go
diff options
context:
space:
mode:
authorPierre Rudloff <contact@rudloff.pro>2016-07-26 14:04:28 +0200
committerChristopher Speller <crspeller@gmail.com>2016-07-26 08:04:28 -0400
commit564dffec35d2ab6772c2561f28d9ad9a2bcbeb40 (patch)
tree6e6caeee6f96707bc5faad7f984e673026e7806e /store/sql_webhook_store.go
parentc56b429e1dee257bac69de1db55cafee01ccd005 (diff)
downloadchat-564dffec35d2ab6772c2561f28d9ad9a2bcbeb40.tar.gz
chat-564dffec35d2ab6772c2561f28d9ad9a2bcbeb40.tar.bz2
chat-564dffec35d2ab6772c2561f28d9ad9a2bcbeb40.zip
Add option to trigger outgoing webhook if first word starts with trigger word (#3611)
Diffstat (limited to 'store/sql_webhook_store.go')
-rw-r--r--store/sql_webhook_store.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/store/sql_webhook_store.go b/store/sql_webhook_store.go
index 72897771d..74432b541 100644
--- a/store/sql_webhook_store.go
+++ b/store/sql_webhook_store.go
@@ -34,6 +34,7 @@ func NewSqlWebhookStore(sqlStore *SqlStore) WebhookStore {
tableo.ColMap("DisplayName").SetMaxSize(64)
tableo.ColMap("Description").SetMaxSize(128)
tableo.ColMap("ContentType").SetMaxSize(128)
+ tableo.ColMap("TriggerWhen").SetMaxSize(1)
}
return s
@@ -46,6 +47,7 @@ func (s SqlWebhookStore) UpgradeSchemaIfNeeded() {
s.CreateColumnIfNotExists("OutgoingWebhooks", "DisplayName", "varchar(64)", "varchar(64)", "")
s.CreateColumnIfNotExists("OutgoingWebhooks", "Description", "varchar(128)", "varchar(128)", "")
s.CreateColumnIfNotExists("OutgoingWebhooks", "ContentType", "varchar(128)", "varchar(128)", "")
+ s.CreateColumnIfNotExists("OutgoingWebhooks", "TriggerWhen", "tinyint", "tinyint", "0")
}
func (s SqlWebhookStore) CreateIndexesIfNotExists() {