4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 09:59:24 +00:00

Sync with mattermost 3.0

This commit is contained in:
Wim
2016-05-15 23:02:30 +02:00
parent 38e3bbe5c9
commit 59e6abcc11
22 changed files with 850 additions and 242 deletions

View File

@ -14,13 +14,15 @@ 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"`
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"`
}
type IncomingWebhookRequest struct {
@ -99,6 +101,14 @@ func (o *IncomingWebhook) IsValid() *AppError {
return NewLocAppError("IncomingWebhook.IsValid", "model.incoming_hook.team_id.app_error", nil, "")
}
if len(o.DisplayName) > 64 {
return NewLocAppError("IncomingWebhook.IsValid", "model.incoming_hook.display_name.app_error", nil, "")
}
if len(o.Description) > 128 {
return NewLocAppError("IncomingWebhook.IsValid", "model.incoming_hook.description.app_error", nil, "")
}
return nil
}