Include extra metadata when clicking an interactive button (#12697)

* Include user_name, team_domain and channel_name when clicking an interactive button

* Fixed api4's TestPostActionCookies test

* Moved team database request to improve concurrency.
Renamed TeamDomain to TeamName.

* Further optimizations to database requests

* Removed useless goroutine when fetching channel
Этот коммит содержится в:
Romain FOYARD
2019-10-30 18:36:14 +01:00
коммит произвёл Lev
родитель 1b95ee9834
Коммит 4111ffdb4d
4 изменённых файлов: 54 добавлений и 9 удалений

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

@@ -27,8 +27,11 @@ func (th *testHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
assert.NotEmpty(th.t, string(bb))
poir := model.PostActionIntegrationRequestFromJson(bytes.NewReader(bb))
assert.NotEmpty(th.t, poir.UserId)
assert.NotEmpty(th.t, poir.UserName)
assert.NotEmpty(th.t, poir.ChannelId)
assert.Empty(th.t, poir.TeamId)
assert.NotEmpty(th.t, poir.ChannelName)
assert.NotEmpty(th.t, poir.TeamId)
assert.NotEmpty(th.t, poir.TeamName)
assert.NotEmpty(th.t, poir.PostId)
assert.NotEmpty(th.t, poir.TriggerId)
assert.Equal(th.t, "button", poir.Type)