added the custom icon and username for the outgoing webhook and its response (#9141)

* 8272 added the username and icon as part of the model and persisted the same

* 8272 added the custome icon and name when set to the web hook response

* 8272 changed the infinte loop to timeout after 5 seconds

* 8272  fixed review comments
Этот коммит содержится в:
Pradeep Murugesan
2018-07-25 14:31:41 +02:00
коммит произвёл Jesse Hallam
родитель b89ccca929
Коммит b3c2ecd9b9
9 изменённых файлов: 236 добавлений и 2 удалений

Просмотреть файл

@@ -476,7 +476,8 @@ func UpgradeDatabaseToVersion51(sqlStore SqlStore) {
func UpgradeDatabaseToVersion52(sqlStore SqlStore) {
// TODO: Uncomment following condition when version 5.2.0 is released
// if shouldPerformUpgrade(sqlStore, VERSION_5_1_0, VERSION_5_2_0) {
sqlStore.CreateColumnIfNotExists("OutgoingWebhooks", "Username", "varchar(64)", "varchar(64)", "")
sqlStore.CreateColumnIfNotExists("OutgoingWebhooks", "IconURL", "varchar(1024)", "varchar(1024)", "")
// saveSchemaVersion(sqlStore, VERSION_5_2_0)
// }
}

Просмотреть файл

@@ -61,6 +61,8 @@ func NewSqlWebhookStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface)
tableo.ColMap("Description").SetMaxSize(128)
tableo.ColMap("ContentType").SetMaxSize(128)
tableo.ColMap("TriggerWhen").SetMaxSize(1)
tableo.ColMap("Username").SetMaxSize(64)
tableo.ColMap("IconURL").SetMaxSize(1024)
}
return s