diff options
Diffstat (limited to 'model/incoming_webhook.go')
-rw-r--r-- | model/incoming_webhook.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/model/incoming_webhook.go b/model/incoming_webhook.go index 2eb007340..3e0488d2b 100644 --- a/model/incoming_webhook.go +++ b/model/incoming_webhook.go @@ -16,17 +16,17 @@ const ( ) type IncomingWebhook struct { - Id string `json:"id"` - CreateAt int64 `json:"create_at"` - UpdateAt int64 `json:"update_at"` - DeleteAt int64 `json:"delete_at"` - UserId string `json:"user_id"` - ChannelId string `json:"channel_id"` - TeamId string `json:"team_id"` - DisplayName string `json:"display_name"` - Description string `json:"description"` - PostUsername string `json:"post_username"` - PostIconURL string `json:"post_icon_url"` + Id string `json:"id"` + CreateAt int64 `json:"create_at"` + UpdateAt int64 `json:"update_at"` + DeleteAt int64 `json:"delete_at"` + UserId string `json:"user_id"` + ChannelId string `json:"channel_id"` + TeamId string `json:"team_id"` + DisplayName string `json:"display_name"` + Description string `json:"description"` + Username string `json:"username"` + IconURL string `json:"icon_url"` } type IncomingWebhookRequest struct { @@ -114,12 +114,12 @@ func (o *IncomingWebhook) IsValid() *AppError { return NewAppError("IncomingWebhook.IsValid", "model.incoming_hook.description.app_error", nil, "", http.StatusBadRequest) } - if len(o.PostUsername) > 64 { + if len(o.Username) > 64 { return NewAppError("IncomingWebhook.IsValid", "model.incoming_hook.username.app_error", nil, "", http.StatusBadRequest) } - if len(o.PostIconURL) > 1024 { - return NewAppError("IncomingWebhook.IsValid", "model.incoming_hook.post_icon_url.app_error", nil, "", http.StatusBadRequest) + if len(o.IconURL) > 1024 { + return NewAppError("IncomingWebhook.IsValid", "model.incoming_hook.icon_url.app_error", nil, "", http.StatusBadRequest) } return nil |