MM-13826 Webhooks: Allow "true"/"false" for bool values in payload body (#10114)
* Webhooks: Allow "true"/"false" for bool values in payload body Some slack integrations encode bool fields as "true"/"false", which was previously unsupported in mattermost due to how encoding/json works. This commit adds an aliased type for bool that implements json.Unmarshaler to maintain compatibility with Slack. * Add missing copyright header to added files
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
684e4cb007
Коммит
e961b4cd0d
@@ -31,9 +31,9 @@ type SlackAttachment struct {
|
||||
}
|
||||
|
||||
type SlackAttachmentField struct {
|
||||
Title string `json:"title"`
|
||||
Value interface{} `json:"value"`
|
||||
Short bool `json:"short"`
|
||||
Title string `json:"title"`
|
||||
Value interface{} `json:"value"`
|
||||
Short SlackCompatibleBool `json:"short"`
|
||||
}
|
||||
|
||||
func StringifySlackFieldValue(a []*SlackAttachment) []*SlackAttachment {
|
||||
|
||||
Ссылка в новой задаче
Block a user